REDHAT-BUG-2498130: High severity npm/js-yaml vulnerability

Published Jul 8, 2026
·
Updated

js-yaml is a JavaScript YAML parser and dumper. From 5.0.0 before 5.2.1, YAML11SCHEMA support for the !!omap tag in src/tag/sequence/omap.ts uses omapTag.addItem() to perform a linear duplicate-key scan on every insertion, causing O(n^2) CPU consumption when yaml.load() parses a crafted ordered-map document. This issue is fixed in version 5.2.1.

Affected Software

1 affected component
npm/js-yaml>=5.0.0<5.2.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/js-yaml to a version that resolves this vulnerability.

    Fixed in 5.2.1

Event History

Jul 8, 2026
Data Sourced
via Red Hat·04:02 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Deployments using npm/js-yaml versions from 5.0.0 before 5.2.1 are affected when YAML11_SCHEMA support is used to parse ordered maps with the !!omap tag.

2

What must an attacker provide to trigger the problem?

An attacker needs to cause yaml.load() to parse a crafted ordered-map YAML document containing !!omap data. The duplicate-key handling performs a linear scan for each insertion, producing quadratic CPU consumption.

3

What should be done to remediate the issue?

Upgrade js-yaml to version 5.2.1, which fixes the issue.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203