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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | node-js-yaml | No fix yet | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | js-yaml | >= 5.0.0, < 5.2.2 | 5.2.2 | GHSA-pm4m-ph32-ghv5 |
Advisories 1
- WID-SEC-2026-3221 IBM App Connect Enterprise: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 13, 2026