js-yaml is vulnerable to Denial of Service (DoS)
75
CVE Score
High
Denial of Service (DoS)
The resolveYamlOmap resolver enforces key uniqueness for !!omap sequences with a linear indexOf scan inside a per-element loop, making resolution take quadratic time in the number of entries. Because !!omap is registered in the default schema, a plain yaml.load call on untrusted input with no options reaches this path. A modestly sized ordered-map document therefore consumes disproportionate CPU synchronously inside yaml.load, blocking the Node.js event loop and stalling the whole process. The fix replaces the linear duplicate-key scan with constant-time lookup so resolution runs in linear time.
Upgrade the js-yaml library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and you parse untrusted or externally influenced YAML input.
3.0.0 - 3.15.0
Fixed in 3.15.14.0.0 - 4.3.0
Fixed in 4.3.1js-yaml is vulnerable to Denial of Service (DoS) in versions 3.0.0 - 3.15.0 and 4.0.0 - 4.3.0.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.