Skip to content
OpenAdvisories
High · 7.5 CVE-2026-73643 EUVD-2026-58185GHSA-pm4m-ph32-ghv5

js-yaml: Exponential parsing time in the flow collections leads to denial of service

Published Aug 13, 2026 · Updated Aug 14, 2026 · Assigned by GitHub_M

Description

js-yaml is a JavaScript YAML parser and dumper. From 5.0.0 until 5.2.2, parsing a small YAML document can take exponential time when an application calls load() or loadAll() on untrusted input. In src/parser/parser.ts, readFlowCollection uses restoreState and calls parseNode a second time when a flow-sequence entry is recognized as a key: value pair. If the key is a nested flow sequence of the same shape, every level is parsed twice, causing O(2^n) work and allowing an input under 200 bytes to keep one CPU busy for minutes, block the Node.js event loop, and stall the process. No anchors, aliases, merges, tags, or nondefault options are required. This issue is fixed in version 5.2.2.

Affected products

VendorProductAffectedFixed
nodeca js-yaml >= 5.0.0, < 5.2.2 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu 26.10 node-js-yaml No fix yet —
Ubuntu 26.04 LTS node-js-yaml No fix yet —
Ubuntu 24.04 LTS node-js-yaml No fix yet —
Ubuntu 22.04 LTS node-js-yaml No fix yet —
Ubuntu 20.04 LTS node-js-yaml No fix yet —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS node-js-yaml No fix yet —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling kubeflow-pipelines-apiserver +1 2.17.2-r4 —
Wolfi rolling kubeflow-pipelines-frontend 2.17.0-r3 —
Wolfi rolling renovate 44.11.3-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm js-yaml >= 5.0.0, < 5.2.2 5.2.2 GHSA-pm4m-ph32-ghv5

Advisories 1

References