Skip to main content

js-yaml CVE-2026-59868

| EUVDEUVD-2026-42302 HIGH
Inefficient Algorithmic Complexity (CWE-407)
2026-07-08 GitHub_M GHSA-g796-fgmg-93mv
7.5
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify endpoint parsing untrusted YAML with merges
  2. Delivery
    Craft small chained merge-key document
  3. Exploit
    Submit document to load()/loadAll()
  4. Execution
    Trigger quadratic key processing
  5. Impact
    Exhaust CPU and stall event loop

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
Exploitation Conditions

Exploitation requires that the target application parse attacker-controlled YAML with js-yaml 5.0.0-5.1.x AND with merge keys (the << merge type) enabled - in practice loading with a YAML 1.1 or otherwise merge-aware schema rather than js-yaml's default schema. The malicious input is a chain of mappings where each merges the previous one (e.g. a{i}: &a{i} { <<: *a{i-1}, k{i}: {i} }), which is small on the wire but forces quadratic key processing. No authentication (PR:N), no user interaction (UI:N), and only network delivery of the document are needed once those conditions hold. The key limiting factor is the merge-keys-enabled requirement: deployments using the default schema, or that do not pass untrusted YAML to load()/loadAll(), are not exploitable, which meaningfully narrows real-world exposure below what the 7.5 network score implies.

Impact

The signals are internally consistent and point to a genuine but bounded availability risk. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) scores 7.5 HIGH driven solely by availability, with no confidentiality or integrity exposure. EPSS is low (0.29%, 21st percentile) and the CVE is NOT on CISA KEV, so there is no evidence of active exploitation. SSVC marks Exploitation=poc (matching the pathological test case shipped with the fix), Automatable=yes, and Technical Impact=partial, which is proportionate for a parser DoS. An important limiting factor the raw CVSS does not capture: exploitation requires the application to have merge keys enabled - in js-yaml this generally means loading with a YAML 1.1 / merge-aware schema rather than the default, so deployments on the default schema are not exposed. Net: a real hardening priority for services that parse untrusted YAML with merge support, but not an emergency - treat as a routine-to-prompt patch rather than a KEV-grade drop-everything item.

Exploit ScenarioDerived

An application that parses user-supplied YAML with merge keys enabled (for example a CI config, template engine, or API payload processor) receives a compact document containing a long chain of mappings where each merges the previous one via <<. When js-yaml constructs the document, the total keys processed explode quadratically, pinning a CPU core and stalling the Node.js event loop so the service stops responding. A proof-of-concept pattern is embodied in the project's own pathological test (createMergeChain), so exercising this against a vulnerable, merge-enabled endpoint is straightforward.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – Jul 13, 2026

Denial of service in the js-yaml Node.js YAML parser (versions 5.0.0 up to but not including 5.2.0) lets a remote attacker consume quadratic CPU time by submitting a small, linearly-sized YAML document that chains merge keys (<<) so each mapping merges the previous one. Because confidentiality and integrity impact are nil and only availability is affected (CVSS 7.5, AV:N/A:H), a single crafted document can stall or hang the parsing thread. SSVC rates this poc / automatable=yes / partial impact; there is no public weaponized exploit and it is not on CISA KEV, with a low EPSS of 0.29%.

Earlier versions of this analysis (2)
v2 Jul 13, 2026 - 15:13 cvss changed CVSS 7.5

Denial of service in js-yaml 5.0.0 through 5.1.x lets remote attackers exhaust CPU by submitting a small YAML document that uses chained merge keys (<<), forcing quadratic parsing time relative to a linearly-growing input. The nodeca js-yaml library, a widely-embedded JavaScript YAML parser, mis-handles a chain of mappings where each mapping merges the previous one, so a compact payload expands into O(n²) key-folding work. Rated CVSS 7.5 (availability-only). SSVC lists a proof-of-concept as available and the flaw as automatable; EPSS is low at 0.29% and it is not in CISA KEV, so no public exploit identified as actively used at time of analysis beyond the PoC.

v1 Jul 08, 2026 - 16:44 CVSS 5.3

Quadratic CPU time consumption in js-yaml 5.0.0 through 5.1.x allows remote unauthenticated attackers to exhaust server CPU by submitting a specially crafted YAML document that exploits chained merge key resolution. Parsing time grows quadratically relative to document size, letting an attacker produce disproportionate server-side load from a small, cheap-to-send payload. No public exploit has been identified at time of analysis; the issue is fixed in version 5.2.0.

RemediationAI

Vendor-released patch: upgrade js-yaml to 5.2.0 or later, which fixes the quadratic merge-key behavior and adds the maxTotalMergeKeys loader option (default 10000) to bound merge processing (release: https://github.com/nodeca/js-yaml/releases/tag/5.2.0; advisory: https://github.com/nodeca/js-yaml/security/advisories/GHSA-g796-fgmg-93mv). If you cannot upgrade immediately, the most effective compensating control is to avoid enabling merge keys when parsing untrusted YAML - load with the default schema instead of a YAML 1.1 / merge-enabled schema, which removes the attack surface entirely at the cost of losing << merge support. Additional layered controls include enforcing strict input-size limits on YAML from untrusted sources and running parsing under a CPU/time budget (for example a worker thread with a timeout, as the project's own pathological test does) so one document cannot hang the main event loop; the trade-off is added complexity and rejecting legitimately large documents. After upgrading, applications that legitimately use merges can tune maxTotalMergeKeys to a lower value for stricter protection.

Affected VersionsENISA

js-yaml 5.0.0, < 5.2.0

Affected Packages

npm js-yaml fix: 5.2.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

js-yaml (published under vendor 'nodeca', CPE cpe:2.3:a:nodeca:js-yaml) is one of the most widely used JavaScript YAML parsers, invoked whenever an application calls load()/loadAll() on YAML input. The flaw is a CWE-407 Inefficient Algorithmic Complexity issue in how the merge key (<<) feature folds one mapping's keys into another: when a chain of mappings each merges the prior mapping (a0 into a1, a1 into a2, and so on), the total number of keys the constructor must process grows quadratically relative to the document's linear source size, producing an algorithmic-complexity DoS. The upstream fix commit (3105455b) confirms the root cause and remedy - the old maxMergeSeqLength cap is replaced with a new maxTotalMergeKeys loader option (default 10000) that bounds the total keys processed by merge across a single load()/loadAll() call and throws a YAMLException once exceeded.

Know when Js Yaml gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY MEDIUM
NVD 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

Attacker sends a crafted document over the network with no auth or interaction (AV:N/PR:N/UI:N); only availability is hit via CPU exhaustion (A:H, C/I:N), and the merge-key precondition is a deployment setting, not attacker effort, so AC:L.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 7.5 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

5
Analysis Updated
Jul 13, 2026 - 15:14 vuln.today
v3 - CVSS changed
Analysis Updated
Jul 13, 2026 - 15:13 vuln.today
v2 - CVSS changed
Severity Changed
Jul 13, 2026 - 15:07 NVD
MEDIUM HIGH
CVSS changed
Jul 13, 2026 - 15:07 NVD
5.3 (MEDIUM) 7.5 (HIGH)
Patch available
Jul 08, 2026 - 17:01 EUVD

DescriptionNVD

js-yaml is a JavaScript YAML parser and dumper. From 5.0.0 before 5.2.0, when merge keys are enabled, js-yaml can spend quadratic CPU time parsing a document whose size grows only linearly when a chain of mappings uses merge keys where each mapping merges the previous one. This issue is fixed in version 5.2.0.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 9 npm packages depend on js-yaml (7 direct, 2 indirect)

Ecosystem-wide dependent count for version 5.0.0.

Executive ViewAI

Why It Matters

js-yaml, a widely deployed Node.js library for parsing YAML configuration and data files, contains a denial-of-service vulnerability (CVE-2026-59868) in versions 5.0.0 through 5.1.x that allows remote attackers to freeze or crash application threads, potentially causing service outages for any organization using vulnerable versions.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 79% exploitable
Prevalence
High
js-yaml is among the most-used npm YAML parsers across Node.js apps
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

58
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy