CVE-2026-102276: brace-expansion: DoS via uncontrolled recursion in parseCommaParts causing stack exhaustion
The brace-expansion library generates arbitrary strings containing a common prefix and suffix. Prior to 1.1.19, 2.1.5, 3.0.7, and 5.0.10, crafted brace patterns can exhaust the native stack in parseCommaParts because parseCommaParts recursively processes the remainder once per brace group and uses push.apply to pass every element of a very large comma-part array as a function argument. Patterns containing many comma-separated brace groups trigger the recursive path, while the large array triggers the argument-array path without deep recursion. These paths cause recursive and argument-array native stack exhaustion before max or maxLength can limit output, potentially terminating the Node.js process in a process-terminating denial of service. This issue is fixed in versions 1.1.19, 2.1.5, 3.0.7, and 5.0.10.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
brace-expansionto a version that resolves this vulnerability.Fixed in 1.1.19 - Upgrade
Upgrade
brace-expansionto a version that resolves this vulnerability.Fixed in 2.1.5 - Upgrade
Upgrade
brace-expansionto a version that resolves this vulnerability.Fixed in 3.0.7 - Upgrade
Upgrade
brace-expansionto a version that resolves this vulnerability.Fixed in 5.0.10
Event History
Frequently Asked Questions
Which deployments are realistically exposed to this denial of service?
Node.js applications are exposed when they process attacker-controlled brace-expansion patterns. Exploitation can terminate the Node.js process, so services that accept patterns through network requests or other untrusted inputs are particularly relevant.
Does limiting expansion output with max or maxLength prevent exploitation?
No. The native stack exhaustion occurs in parseCommaParts before max or maxLength can limit the generated output.
What input characteristics trigger the vulnerable paths?
Patterns with many comma-separated brace groups trigger recursive processing of the remaining pattern. A very large comma-part array can also exhaust the native stack through push.apply, even without deep recursion.
Which versions contain the fix?
The fixed releases are 1.1.19, 2.1.5, 3.0.7, and 5.0.10. Versions before the corresponding fixed release are affected.