All vulnerabilities

npm

CVE-2026-102276

brace-expansion: DoS via uncontrolled recursion in parseCommaParts causing stack exhaustion

Severity
High 7.5
Published
29 Sept 2026
Last changed
30 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
1.1.19, 2.1.5, 3.0.7, 5.0.10
Exploit chance
0.5% in the next 30 daysHigher than 40% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Uncontrolled resource consumption (CWE-400)Uncontrolled recursion (CWE-674)
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-6j4f-fj2g-mc7p
Sources
OSV.dev and GitHub

Description

parseCommaParts() can exhaust the native stack and crash the process. There are two distinct ways to trigger it, both reachable from a single untrusted pattern string.

This is the parsing-side counterpart to CVE-2026-14257 / GHSA-mh99-v99m-4gvg. That fix made expand_() iterative and documented a constant-stack-depth guarantee, but parseCommaParts() was left recursive, so the guarantee only held for one of the two parsing paths.

parseCommaParts() recursed on the remainder of the string once per brace group:

A brace group containing many comma-separated groups drives one recursion level per group:

About 7,300 repetitions - roughly 29 KB of input - is enough on Node 24; roughly 6,300 (25 KB) on Node 18. The threshold is identical on every affected release line.

Even with the recursion removed, parseCommaParts() spread whole arrays into an argument list:

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
brace-expansionnpm · osv:npm:brace-expansion
  • Every version before 1.1.19
  • From 2.0.0 before 2.1.5
  • From 3.0.0 before 3.0.7
  • From 4.0.0 before 5.0.10

About brace-expansion

Weekly downloads (npm)
838,345,228npm, 16 Nov 2026

References