Description
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 products
nodeca: js-yaml
References4
- github.com/nodeca/js-yaml/security/advisories/GHSA-g796-fgmg-93… ExploitVendor Advisory
- github.com/nodeca/js-yaml/security/advisories/GHSA-g796-fgmg-93… ExploitVendor Advisory
- github.com/nodeca/js-yaml/commit/3105455b81dee69e0fd36e09ac0b2c… Patch
- github.com/nodeca/js-yaml/releases/tag/5.2.0 Release Notes
Metrics
- CVSS 3.1
-
7.5
HIGH
Score source: NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - EPSS — exploit probability
- 1% percentile: 51 · as of 15 November 2026
- CWE
- CWE-407CWE-770
Could this be exploited in your environment?
A patch closes the known hole. A penetration test shows what an attacker can still reach — with proof.