REDHAT-BUG-2498114: 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.0, when merge keys are enabled, js-yaml can spend quadratic CPU time parsing a document whose size grows only linearly when a chain of mappings uses merge keys where each mapping merges the previous one. This issue is fixed in version 5.2.0.

Affected Software

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

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 5.2.0

Event History

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

Frequently Asked Questions

1

What input is required to trigger the excessive CPU use?

An attacker needs to supply a YAML document containing a chain of mappings that use merge keys, with each mapping merging the previous one. This causes parsing time to grow quadratically while the document size grows linearly.

2

Is every js-yaml deployment affected?

The issue applies to js-yaml versions from 5.0.0 before 5.2.0 when merge keys are enabled. Deployments not using affected versions or not enabling merge keys are not described as affected.

3

What version resolves the issue?

Upgrade js-yaml to version 5.2.0 or later. Version 5.2.0 contains the fix.

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