CVE-2026-59869: nodeca js-yaml denial of service via merge key chains

CVE-2026-59869 · Severity: high · CVSS 7.5 · Published 2026-07-08

js-yaml is a popular YAML parser used across many Node.js applications for configuration and data parsing. An attacker can exploit a flaw in how the library handles YAML merge keys to force excessive CPU consumption during parsing, allowing them to disable applications or services by providing specially crafted YAML documents that take quadratic time to process.

Technologies: js-yaml (npm). Vendors: npm.

Quick answers

Is CVE-2026-59869 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-59869 being exploited in the wild.
How severe is CVE-2026-59869?
High severity, with a CVSS score of 7.5, published 8 July 2026.
Which products and versions are affected?
js-yaml (npm) SEMVER:introduced=3.0.0,fixed=3.15.0.
Is there a fix for CVE-2026-59869?
Yes. js-yaml (npm): upgrade to 3.15.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-59869 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-59869?
Check whether you run js-yaml (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • js-yaml (npm): upgrade to 3.15.0 or later
    npm install js-yaml@3.15.0

Technical details

The vulnerability is a resource exhaustion (CWE-400) in js-yaml's YAML merge key (`<<`) handling. When processing chained mappings where each mapping merges the previous one via the merge key operator, the parser must enumerate all inherited keys for each new mapping, resulting in O(N²) CPU time for O(N) input size. The attack requires no authentication or user interaction—any network-reachable application that parses untrusted YAML with js-yaml versions 3.0.0–3.14.x or 4.0.0–4.2.x is vulnerable. The fix (versions 3.15.0 and 4.3.0) introduces a `maxTotalMergeKeys` option (default 10,000) that limits the total number of keys processed via merge operations in a single parse call.

Affected products

  • nodeca js-yaml 3.0.0 to 3.14.x, 4.0.0 to 4.2.x

Identifiers

  • CVE-2026-59869
  • GHSA-52cp-r559-cp3m

Timeline

  • 2026-07-20: disclosed: Advisory GHSA-52cp-r559-cp3m published
  • 2026-06-26: patched: Fix committed with maxTotalMergeKeys option
  • 2026-07-20: patched: Patches released in js-yaml 3.15.0 and 4.3.0

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.