Quick answers
- Is CVE-2026-59870 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-59870 being exploited in the wild.
- How severe is CVE-2026-59870?
- Medium severity, with a CVSS score of 5.3, published 8 July 2026.
- Which products and versions are affected?
- js-yaml (npm) >= 5.0.0, <= 5.2.0, SEMVER:introduced=5.0.0,fixed=5.2.1.
- Is there a fix for CVE-2026-59870?
- Yes. js-yaml (npm): upgrade to 5.2.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-59870 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-59870?
- 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 5.2.1 or later
npm install js-yaml@5.2.1
Technical details
The vulnerability exists in the `omapTag.addItem()` function within `src/tag/sequence/omap.ts`. When parsing a YAML document using `YAML11_SCHEMA`, the library performs a linear O(n) scan for duplicate keys upon every insertion into an ordered map, resulting in quadratic O(n^2) time complexity. A remote attacker can provide a crafted YAML payload (e.g., 50,000 entries in a 2MB file) to block the Node.js event loop for several seconds, causing a Denial of Service. This issue was introduced in version 5.0.0 and is fixed in version 5.2.1 by implementing a Set-based lookup for duplicate detection.
Affected products
- nodeca js-yaml >= 5.0.0, <= 5.2.0
Identifiers
- CVE-2026-59870
- GHSA-724g-mxrg-4qvm
Timeline
- 2026-06-20: other: Vulnerable 5.x series first published
- 2026-07-02: patched: Fix released in version 5.2.1
- 2026-07-08: advisory: NVD publication date
- 2026-07-20: advisory: GitHub Advisory published