js-yaml: Exponential parsing time in flow collections leads to denial of service
CVE-2026-73643GHSA-pm4m-ph32-ghv5
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (js-yaml 5.2.2), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
npm js-yaml
- Affected
- >= 5.0.0, <= 5.2.1
- Fixed in
- 5.2.2
Sources
- Open Source Vulnerabilities (OSV.dev), including the GitHub Advisory Database
OSV record GHSA-pm4m-ph32-ghv5 lists affected ranges: npm js-yaml >=5.0.0 <5.2.2 (fixed)
VerifiedObserved Structured OSV record; GitHub-reviewed advisory.
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-pm4m-ph32-ghv5 lists affected ranges: npm js-yaml >=5.0.0 <=5.2.1
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS
- 7.5 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS
- CVE-2026-73643: 0.49% estimated exploitation activity in the next 30 days; percentile 42.05 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description
As published by the source; long descriptions are shortened.
Summary Parsing 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. Details When 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. If 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. Root cause, potentially the: readFlowCollection in parser.ts, the restoreState followed by a second parseNode further down. PoC With 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. Impact Denial of service. A single small request can keep one CPU busy for minutes or longer and blocks the Node event loop, so one…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 2 · amended ·
Amended from ghsa record GHSA-pm4m-ph32-ghv5
- Revision 1 · created ·
Published from osv record GHSA-pm4m-ph32-ghv5
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: CVE-2026-73643 Advisory: js-yaml: Exponential parsing time in flow collections leads to denial of service IDs: CVE-2026-73643, GHSA-pm4m-ph32-ghv5 Record: https://patchnext.com/advisories/cve-2026-73643 (revision 2, source checked 26 Oct 2026, 13:01 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: High (CVSS 7.5) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: js-yaml 5.2.2. A vendor fix does not mean a deployment is fixed. ## Affected components - npm js-yaml: affected >= 5.0.0, <= 5.2.1; fixed in 5.2.2 ## Suggested inspection (read-only) - `npm ls js-yaml --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on js-yaml. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://osv.dev/vulnerability/GHSA-pm4m-ph32-ghv5 (OSV record GHSA-pm4m-ph32-ghv5 lists affected ranges: npm js-yaml >=5.0.0 <5.2.2 (fixed)) - Verified: https://github.com/advisories/GHSA-pm4m-ph32-ghv5 (GitHub-reviewed advisory GHSA-pm4m-ph32-ghv5 lists affected ranges: npm js-yaml >=5.0.0 <=5.2.1) Commands are suggestions: review each one before running it.
Loading voting…