CVE-2026-59870: CWE-407: Inefficient Algorithmic Complexity in nodeca js-yaml
js-yaml is a JavaScript YAML parser and dumper. From 5.0.0 before 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. This issue is fixed in version 5.2.1.
AI Analysis
Technical Summary
The js-yaml JavaScript library versions from 5.0.0 up to but not including 5.2.1 contain an inefficient algorithmic complexity vulnerability (CWE-407) in the YAML11_SCHEMA support for the !!omap tag. Specifically, the omapTag.addItem() function performs a linear scan for duplicate keys on every insertion, causing quadratic CPU consumption (O(n^2)) when parsing a specially crafted ordered-map YAML document. This can lead to excessive CPU usage and potential denial of service. The issue is resolved in version 5.2.1.
Potential Impact
The vulnerability causes high CPU consumption during YAML parsing, which can degrade application performance or cause denial of service conditions. There is no impact on confidentiality or integrity. The CVSS score of 5.3 reflects a medium severity denial of service impact with network attack vector and no privileges or user interaction required.
Mitigation Recommendations
Upgrade js-yaml to version 5.2.1 or later, where this inefficient algorithmic complexity issue is fixed. No other mitigations are indicated. Patch status is confirmed by the version fix information.
CVE-2026-59870: CWE-407: Inefficient Algorithmic Complexity in nodeca js-yaml
Description
js-yaml is a JavaScript YAML parser and dumper. From 5.0.0 before 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. This issue is fixed in version 5.2.1.
CVSS v3.1
Score 5.3medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The js-yaml JavaScript library versions from 5.0.0 up to but not including 5.2.1 contain an inefficient algorithmic complexity vulnerability (CWE-407) in the YAML11_SCHEMA support for the !!omap tag. Specifically, the omapTag.addItem() function performs a linear scan for duplicate keys on every insertion, causing quadratic CPU consumption (O(n^2)) when parsing a specially crafted ordered-map YAML document. This can lead to excessive CPU usage and potential denial of service. The issue is resolved in version 5.2.1.
Potential Impact
The vulnerability causes high CPU consumption during YAML parsing, which can degrade application performance or cause denial of service conditions. There is no impact on confidentiality or integrity. The CVSS score of 5.3 reflects a medium severity denial of service impact with network attack vector and no privileges or user interaction required.
Mitigation Recommendations
Upgrade js-yaml to version 5.2.1 or later, where this inefficient algorithmic complexity issue is fixed. No other mitigations are indicated. Patch status is confirmed by the version fix information.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-07-07T15:41:53.607Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a4e73c2c9d9e3dbe36042bb
Added to database: 07/08/2026, 15:58:58 UTC
Last enriched: 07/08/2026, 16:14:25 UTC
Last updated: 07/08/2026, 17:23:21 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.