Shescape: Quadratic-time denial of service in flag-protection
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-400.
Summary
Shescape is a simple shell escape library for JavaScript. From 2.1.11 until 2.1.14 and 3.0.1, the flag-protection loop in compose in src/internal/compose.js repeatedly joins and slices flag fragments when flagProtection is enabled, which is the default, making processing quadratic in input size across the escape, escapeAll, quote, and quoteAll APIs. An attacker who can supply a large untrusted input containing many flag fragments can consume CPU and cause denial of service. This issue is fixed in versions 2.1.14 and 3.0.1.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| ericcornelissen | shescape | 2.1.11 to before 2.1.14; 3.0.0 to before 3.0.1 | 2.1.14, 3.0.1 | Patch available | CNA |
| — | shescape (npm) | 2.1.11 to before 2.1.14 | 2.1.14 | Patch available | GHSA-gm3r-q2wp-hw87 |
| — | shescape (npm) | 3.0.0 to before 3.0.1 | 3.0.1 | Patch available | GHSA-gm3r-q2wp-hw87 |
- shescape Vendorericcornelissen Affected 2.1.11 to before 2.1.14; 3.0.0 to before 3.0.1 Fixed in 2.1.14, 3.0.1 Patch available CNA
- shescape (npm) Vendor— Affected 2.1.11 to before 2.1.14 Fixed in 2.1.14 Patch available GHSA-gm3r-q2wp-hw87
- shescape (npm) Vendor— Affected 3.0.0 to before 3.0.1 Fixed in 3.0.1 Patch available GHSA-gm3r-q2wp-hw87
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:shescape_project:shescape:*:*:*:*:*:*:*:* | — | — | ericcornelissen |
- cpe:2.3:a:shescape_project:shescape:*:*:*:*:*:*:*:* Versions — — ·ericcornelissen
Remediation
- Fix · CNA shescape (ericcornelissen) Fixed in 2.1.14, 3.0.1
- Fix · GHSA-gm3r-q2wp-hw87 shescape (npm) Fixed in 2.1.14 Advisory →
- Fix · GHSA-gm3r-q2wp-hw87 shescape (npm) Fixed in 3.0.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-73413
- 2026-10-03 Alias added: GHSA-gm3r-q2wp-hw87
References
Other 9
- https://github.com/ericcornelissen/shescape/security/advisories/GHSA-gm3r-q2wp-hw87
- https://github.com/ericcornelissen/shescape/pull/2649
- https://github.com/ericcornelissen/shescape/pull/2651
- https://github.com/ericcornelissen/shescape/commit/43d70b59d09bbe5c3fd02ef08b3a123e977ed9de
- https://github.com/ericcornelissen/shescape/commit/b4b34c394e7f9da2775bb75381066b9a228c425f
- https://github.com/ericcornelissen/shescape/releases/tag/v2.1.14
- https://github.com/ericcornelissen/shescape/releases/tag/v3.0.1
- https://github.com/ericcornelissen/shescape
- https://github.com/ericcornelissen/shescape/blob/dea8893a5877893d8d4923dbf253080e08899e6d/docs/migration.md
More ericcornelissen vulnerabilities
- TI-2022-13220 Insufficient escaping of whitespace in shescape CVSS 3.1CRITICAL 9.8
- TI-2022-13219 Insufficient escaping of line feeds for CMD in shescape CVSS 3.1CRITICAL 9.8
- TI-2022-09469 Regular expression denial of service (ReDoS) in shescape CVSS 3.1HIGH 7.5
- TI-2026-24632 Shescape escape() leaves bracket glob expansion active on Bash, BusyBox, and Dash CVSS 4.0MEDIUM 6.9
- TI-2022-16487 Shescape Inefficient Regular Expression Complexity vulnerability CVSS 3.1HIGH 7.5
- TI-2022-08540 Exposure of home directory through shescape on Unix with Bash CVSS 3.1MEDIUM 6.2
Sources
- CVE-2026-73413 · CVE Program
- CVE-2026-73413 · NVD
- FIRST EPSS
- GHSA-gm3r-q2wp-hw87 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences