Skip to main content
← All vulnerabilities
CVE-2026-73643GHSA-PM4M-PH32-GHV5

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 5.2.2
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: partial

  3. Record last updated

Affected versions

  • nodeca js-yaml

    From 5.0.0 · fixed in 5.2.2

  • js-yamlnpm

    From 5.0.0 · fixed in 5.2.2

References 2

GitHub · nodeca/js-yaml