All vulnerabilities

npm

CVE-2026-59869

js-yaml: YAML merge-key chains can force quadratic CPU consumption

Severity
High 7.5
Published
20 Jul 2026
Last changed
10 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
3.15.0, 4.3.0
Exploit chance
0.6% in the next 30 daysHigher than 48% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Uncontrolled resource consumption (CWE-400)Inefficient algorithmic complexity (CWE-407)
Attack
Over the network · No login needed · No user action needed
Attacker can
Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Also known as
GHSA-52cp-r559-cp3m
Sources
OSV.dev and GitHub

Description

js-yaml can spend quadratic CPU time parsing a document whose size grows only linearly. The issue is triggered by a chain of mappings where each mapping merges the previous one:

For each new mapping, the loader has to enumerate the keys inherited from the previous mapping. With N chained mappings, this results in roughly 1 + 2 + ... + N merged-key visits, i.e., O(N^2) work for O(N) input size.

From the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
js-yamlnpm · osv:npm:js-yaml
  • From 3.0.0 before 3.15.0
  • From 4.0.0 before 4.3.0

About js-yaml

Weekly downloads (npm)
399,660,092npm, 17 Nov 2026

References