CVE-2026-73643: js-yaml Denial of Service Vulnerability
HIGHCVE-2026-73643 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-407: Inefficient Algorithmic Complexity) affecting js-yaml libraries in the npm ecosystem. The issue involves exponential parsing time in flow collections leads to denial of service. Remediation is available by upgrading affected packages to version 5.2.2.
CVE-2026-73643 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-73643
To remediate this vulnerability, upgrade all affected js-yaml dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install js-yaml@5.2.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls js-yaml
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-73643, inspect your project dependencies using npm:
npm ls js-yaml
Analyze the terminal output to locate any version of js-yaml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.2.2), your application is affected.
Note: The npm ls js-yaml command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-407: Inefficient Algorithmic Complexity, where an algorithm in a product has an inefficient worst-case computational complexity that may be detrimental to system performance and can be triggered by an attacker, typically using crafted manipulations that ensure that the worst case is being reached. In js-yaml, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-73643 Affected js-yaml Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
js-yaml
|
npm |
≥ 5.0.0
< 5.2.2
|
5.2.2
|
References
Frequently Asked Questions
What is CVE-2026-73643?
Which js-yaml versions are affected?
What version fixes CVE-2026-73643?
Is js-yaml affected?
What is the CVSS score of CVE-2026-73643?
What CWE is associated with CVE-2026-73643?
How can I check npm dependencies for CVE-2026-73643?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pm4m-ph32-ghv5",
"modified" : "2026-08-13T17:47:36Z",
"published" : "2026-07-24T16:47:36Z",
"aliases" : [ "CVE-2026-73643" ],
"summary" : "js-yaml: Exponential parsing time in flow collections leads to denial of service",
"details" : "### Summary\nParsing a small YAML document can take exponential time. An application that calls `load()` or `loadAll()` on untrusted input can be hung by a payload under 200 bytes.\n\n### Details\nWhen an entry in a flow sequence turns out to be a `key: value` pair, the parser rewinds and parses that entry a second time as the key.\nIf the key is itself a nested flow sequence of the same shape, every level is parsed twice, so the total work is O(2^n) in the nesting depth. The default `maxDepth` of 100 does not help, because the time is already unmanageable at about 30 to 40 levels.\n\nRoot cause, potentially the: `readFlowCollection` in [parser.ts](https://github.com/nodeca/js-yaml/blob/master/src/parser/parser.ts), the `restoreState` followed by a second `parseNode` further down.\n\n\n### PoC\n\n```javascript\nconst yaml = require('js-yaml')\nconst n = 30\nyaml.load('[ '.repeat(n) + '1' + ' ]: 0'.repeat(n))\n```\n\nWith default options: 22 levels takes about 1 second, 26 levels about 17 seconds, 30 levels over 2 minutes. The input stays under 200 bytes and grows linearly with `n`.\n\n### Impact\nDenial of service. A single small request can keep one CPU busy for minutes or longer and blocks the Node event loop, so one request can stall the whole process. No anchors, aliases, merges, tags, or non default options are required, and it reproduces on the default schema.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "js-yaml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.2.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.2.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/nodeca/js-yaml/security/advisories/GHSA-pm4m-ph32-ghv5"
}, {
"type" : "WEB",
"url" : "https://github.com/nodeca/js-yaml/commit/3e5240f9cbe645ce5afb58524954a13c8539c853"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/nodeca/js-yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/nodeca/js-yaml/releases/tag/5.2.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-407" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-24T16:47:36Z",
"nvd_published_at" : null
}
}