Vulnerability
CVE-2026-84375
js-yaml is a JavaScript YAML parser and dumper. From 3.0.0 until 3.15.2, 4.3.2, and 5.4.1, maxTotalMergeKeys in lib/js-yaml/loader.js and lib/loader.js does not count empty mapping sources while processing the merge key <<. An attacker can alias a large sequence of empty mappings into many merge targets, causing O(N * K) processing while totalMergeKeys remains unchanged and the configured resource limit is never reached. A relatively small YAML document can therefore cause prolonged CPU consumption in applications that parse untrusted YAML, and merge processing is enabled by default on these release lines. In v3 & v4, merge is enabled by default so the severity score is higher. This issue is fixed in versions 3.15.2, 4.3.2, and 5.4.1.
216 advisories report this vulnerability, across 9 ecosystems.
Advisories in Wolfi
- CGA-2vfp-cxh4-5v4m
- CGA-3xqh-3qvx-r885
- CGA-4c33-fhv5-wm8x
- CGA-5288-f695-87qc
- CGA-775v-vgwc-rv66
- CGA-82gh-x274-r88v
- CGA-8v5w-wc8j-cg53
- CGA-9rr9-g282-4cw5
- CGA-fff5-hvq2-qwc5
- CGA-fgm6-4hqr-jrm9
- CGA-gq66-9wfg-r2c2
- CGA-j5j8-gfgj-xvhw
- CGA-j8gf-f4c2-43cc
- CGA-jh9r-4mv7-ph6p
- CGA-m79x-866p-ggc4
- CGA-p5wp-crv6-p2xm
- CGA-p6rm-2xw8-g92v
- CGA-pc73-73jj-w7h2
- CGA-r29q-xchp-68h3
- CGA-r52c-hf4c-c89q
- CGA-rc5c-q73x-5mww
- CGA-rc76-5mpv-rw9w
- CGA-v8vw-j96g-3r6q
- CGA-vrr6-m3mq-8xr9
- CGA-w367-79c3-6p93
- CGA-w75r-x545-9rpp
- CGA-xr77-37wf-8rrx
- CGA-xwmh-xhm7-hcrc
References
- https://github.com/nodeca/js-yaml/commit/3485bc06ff8a0251505f44a00414d90df2466639
- https://github.com/nodeca/js-yaml/commit/6a8e05f9a485188ed730ac81e81ae221352ef480
- https://github.com/nodeca/js-yaml/commit/d90b6612a5a84385bdcb556c44578eac76dc0f6b
- https://github.com/nodeca/js-yaml/pull/797
- https://github.com/nodeca/js-yaml/releases/tag/3.15.2
- https://github.com/nodeca/js-yaml/releases/tag/4.3.2
- https://github.com/nodeca/js-yaml/releases/tag/5.4.1
- https://github.com/nodeca/js-yaml/security/advisories/GHSA-2883-xcg3-v3hh