js-yaml is vulnerable to Denial of Service (DoS)
75
High Risk
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.
You are affected if you are using a version that falls within the vulnerable range and you parse untrusted or externally influenced YAML input.
js-yaml is vulnerable to Denial of Service (DoS) in versions 3.0.0 - 3.15.0 and 4.0.0 - 4.3.0.
Upgrade the js-yaml library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant