CVE-2025-64718: js-yaml has prototype pollution in merge (<<)
Impact In js-yaml 4.1.0, 4.0.0, and 3.14.1 and below, it's possible for an attacker to modify the prototype of the result of a parsed yaml document via prototype pollution (proto). All users who parse untrusted yaml documents may be impacted. Patches Problem is patched in js-yaml 4.1.1 and 3.14.2.
Published Nov 14, 2025 · Updated Jan 31, 2026
Affected packages
js-yaml
- Ecosystem
- npm
- Affected
- >= 4.0.0, < 4.1.1
- Fixed in
- 4.1.1
- Check
npm ls js-yaml
js-yaml
- Ecosystem
- npm
- Affected
- < 3.14.2
- Fixed in
- 3.14.2
- Check
npm ls js-yaml
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Impact
In js-yaml 4.1.0, 4.0.0, and 3.14.1 and below, it's possible for an attacker to modify the prototype of the result of a parsed yaml document via prototype pollution (__proto__). All users who parse untrusted yaml documents may be impacted.
Patches
Problem is patched in js-yaml 4.1.1 and 3.14.2.
Workarounds
You can protect against this kind of attack on the server by using node --disable-proto=delete or deno (in Deno, pollution protection is on by default).
References
https://cheatsheetseries.owasp.org/cheatsheets/Prototype_Pollution_Prevention_Cheat_Sheet.html
Credited to Zephkek, mhassan1, opal-visibuild, alexstrive, jlp-craigmorten, turi4200.
References
- https://github.com/nodeca/js-yaml/security/advisories/GHSA-mh29-5h37-fv8m
- https://nvd.nist.gov/vuln/detail/CVE-2025-64718
- https://github.com/nodeca/js-yaml/commit/383665ff4248ec2192d1274e934462bb30426879
- https://github.com/nodeca/js-yaml/commit/5278870a17454fe8621dbd8c445c412529525266
- https://github.com/nodeca/js-yaml/issues/730#issuecomment-3549635876
- https://github.com/advisories/GHSA-mh29-5h37-fv8m
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesGHSA-r3ph-w7gj-g6xm
js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources
medium5.3Sep 29, 2026CVE-2026-84375
js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources
high7.5Sep 8, 2026GHSA-5p4m-2wfm-xmqj
JS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026-59870 fix not backported
high7.5Aug 6, 2026CVE-2026-73643
js-yaml: Exponential parsing time in flow collections leads to denial of service
high7.5Jul 24, 2026CVE-2026-59868
js-yaml: YAML merge-key chains can force quadratic CPU consumption in js-yaml
medium5.3Jul 20, 2026CVE-2026-59869
js-yaml: YAML merge-key chains can force quadratic CPU consumption
high7.5Jul 20, 2026
