js-yaml is vulnerable to Denial of Service (DoS)
75
CVE Score
High
Denial of Service (DoS)
Affected versions of this package are vulnerable to Denial of Service (DoS) in the resolver for the !!omap ordered-map tag, which enforces key uniqueness with a linear array scan performed on every element. Resolving an ordered map with n entries therefore costs quadratic time, so a modestly sized document consumes disproportionate CPU inside load. Because !!omap is part of the default schema, parsing untrusted YAML with no special options blocks the event loop and can stall an entire process. The fix replaces the per-element linear duplicate-key scan with a set-based lookup so resolution runs in linear time.
Upgrade the org.mvnpm:js-yaml library to the patch version.
You are affected if your application calls yaml.load() (or an equivalent parse entry point) on YAML that is user-controlled or otherwise untrusted while running an affected 3.x or 4.x version. No special options or custom schema are required: !!omap is registered in the default schema, so a plain load of untrusted input reaches the quadratic resolver.
3.0.0 - 4.3.0
Fixed in 4.3.1js-yaml is vulnerable to Denial of Service (DoS) in versions 3.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.