All vulnerabilities

npm

CVE-2026-69152

brace-expansion: DoS via unbounded intermediate arrays, bypassing the CVE-2026-14257 mitigation

Severity
High 7.5
Published
3 Aug 2026
Last changed
10 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
1.1.18, 2.1.4, 3.0.6, 5.0.9
Exploit chance
0.6% in the next 30 daysHigher than 51% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Uncontrolled resource consumption (CWE-400)Allocation without limits (CWE-770)
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-rgw5-rvv9-x895
Sources
OSV.dev and GitHub

Description

The maxLength mitigation added in 5.0.8 for GHSA-mh99-v99m-4gvg / CVE-2026-14257 is incomplete. It bounds the accumulator where results are combined, but not the intermediate arrays that feed it. A ~25 KB input still crashes the Node process with an uncatchable out-of-memory error, so try/catch around expand() does not help.

A second, related path in the same function lets a ~400 KB input block the event loop for over two minutes without ever exceeding the memory bound.

maxLength was enforced in combine(), the single place output grows. Two arrays are built before combine() runs, and neither was bounded.

1. Comma alternatives accumulate without a running total (memory exhaustion)

Each alternative in {a,b,c,...} is expanded by its own recursive expand_() call, so each receives a full, independent maxLength allowance. The results were then concatenated into a single values array with no cumulative limit:

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

Workarounds

If upgrading is not immediately possible, avoid passing untrusted input to expand() or to glob brace patterns, or pass an explicitly small max and maxLength.

Note that a small maxLength alone was not sufficient on affected versions: it was applied per alternative rather than cumulatively, which is the root of the first issue above.

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
brace-expansionnpm · osv:npm:brace-expansion
  • Every version before 1.1.18
  • From 2.0.0 before 2.1.4
  • From 3.0.0 before 3.0.6
  • From 4.0.0 before 5.0.9

About brace-expansion

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

References