brace-expansion: DoS via uncontrolled recursion on nested brace groups causing stack exhaustion
juliangruber brace-expansion
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| brace-expansion npm |
|
|
juliangruber brace-expansion
| Product | Affected | Fixed in |
|---|---|---|
| brace-expansion npm |
|
|
The brace-expansion library generates arbitrary strings containing a common prefix and suffix. Prior to 1.1.20, 2.1.6, 3.0.8, and 5.0.11, deeply nested brace groups cause expand_() to recurse once per nesting level at comma-member and single-set expansion sites, exhausting the native stack before output limits can apply and potentially terminating the Node.js process. expand_ performs uncontrolled recursion for nested brace alternatives and single-part sets. deeply nested brace groups supplied as an untrusted pattern. expand_ is affected. expand is affected. Comma members is affected. Single set is affected. native stack exhaustion during nested sub-expansion. process-terminating denial of service. This issue is fixed in versions 1.1.20, 2.1.6, 3.0.8, and 5.0.11.
From the CVE record · GitHub_M
Deeply nested brace groups trigger uncontrolled recursion in brace-expansion before output limits can apply. An attacker who can supply an untrusted pattern may exhaust the native stack and terminate the Node.js process. The input does not specify whether network access, authentication, or user interaction is required.
Check applications using npm brace-expansion versions before 1.1.20, 2.1.0 through 2.1.5, 3.0.0 through 3.0.7, or 4.0.0 through 5.0.10.