npm
CVE-2026-59869
js-yaml: YAML merge-key chains can force quadratic CPU consumption
- Severity
- High 7.5
- Published
- 20 Jul 2026
- Last changed
- 10 Sept 2026
- Added to UpHeron
- 22 Oct 2026
- Fixed in
- 3.15.0, 4.3.0
- Exploit chance
- 0.6% in the next 30 daysHigher than 48% of CVEs. EPSS by FIRST, 19 Nov 2026
- Attack
- Over the network · No login needed · No user action needed
- Attacker can
- Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- Also known as
- GHSA-52cp-r559-cp3m
- Sources
- OSV.dev and GitHub
Description
js-yaml can spend quadratic CPU time parsing a document whose size grows only linearly. The issue is triggered by a chain of mappings where each mapping merges the previous one:
For each new mapping, the loader has to enumerate the keys inherited from the previous mapping. With N chained mappings, this results in roughly 1 + 2 + ... + N merged-key visits, i.e., O(N^2) work for O(N) input size.
Affected software
| Software | Affected versions |
|---|---|
js-yamlnpm · osv:npm:js-yaml |
|
About js-yaml
- Weekly downloads (npm)
- 399,660,092npm, 17 Nov 2026
Vulnerabilities in js-yaml
- In our list
- 4
- Published in the last 12 months
- 4
- Critical, last 12 months
- 0
- High, last 12 months
- 3
- Known exploited
- 0
- CVE-2026-84375js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sourcesHigh 7.5 8 Sept 2026
- GHSA-5p4m-2wfm-xmqjJS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026-59870 fix not backportedHigh 7.5 6 Aug 2026
- CVE-2026-53550JS-YAML: Quadratic-complexity DoS in merge key handling via repeated aliasesMedium 5.3 15 Jun 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-59869
- GitHub Advisory Database https://github.com/advisories/GHSA-52cp-r559-cp3m