Nodeca js-yaml
js-yaml quadratic-complexity denial of service via YAML11_SCHEMA !!omap parsing
js-yaml is a JavaScript YAML parser and dumper. Prior to 3.15.1, 4.3.1, and 5.2.1, YAML11_SCHEMA support for the !!omap tag in src/tag/sequence/omap.ts uses omapTag.addItem() to perform a linear duplicate-key scan on every insertion, causing O(n^2) CPU consumption when yaml.load() parses a crafted ordered-map document. In v3 and v4, !!omap is active and exploitable by default. v5 doesn't use !!omap by default, and the chances of activating it are very low.This issue is fixed in 3.15.1, 4.3.1, and 5.2.1.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS7.5high · scored by CNA · CWE-407
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
nodeca js-yaml
- >= 5.0.0, < 5.2.1
- >= 3.0.0, < 3.15.1
- >= 4.0.0, < 4.3.1
Fixed in 5.2.1, 3.15.1, 4.3.1
Mitigation
Upgrade js-yaml to 5.2.1 or 3.15.1 or 4.3.1 or later.
References
- Vendor advisory github.com/nodeca/js-yaml/security/advisories/…
- Patch github.com/nodeca/js-yaml/commit/22a8071ef0321…
- Patch github.com/nodeca/js-yaml/commit/39f3211a2f01b…
4 more
- Patch github.com/nodeca/js-yaml/commit/c3cc4b0bb9ddb…
- Release notes github.com/nodeca/js-yaml/releases/tag/3.15.1
- Release notes github.com/nodeca/js-yaml/releases/tag/4.3.1
- Release notes github.com/nodeca/js-yaml/releases/tag/5.2.1
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.