Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit oversized crafted payload
-
DeliveryReach application endpoint invoking Shescape API
-
ExploitDefault flagProtection processes null-dash fragments
-
ExecutionQuadratic join loop exhausts CPU cycles
-
PersistServer becomes unresponsive
-
ImpactDeny service to legitimate users
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that attacker-controlled input reaches any of Shescape's four public APIs - escape, escapeAll, quote, or quoteAll - without a prior length restriction. Flag protection must be active, but this is the library default (flagProtection unspecified or explicitly true), so no non-default configuration is needed. The attacker must be able to supply input long enough to trigger meaningful quadratic slowdown; the PoC uses 32,000 repetitions (~64,000 characters). Exploitation is limited by any upstream input validation in the consuming application that bounds string length before calling Shescape. Whether the vulnerable API endpoint requires application-level authentication depends entirely on the application, not on Shescape itself - the library imposes no authentication of its own. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VA:H) scores 8.7, reflecting network-accessible exploitation with no authentication, no attack prerequisites, and high availability impact. There is no confidentiality or integrity effect. No EPSS score was provided in the input data, so exploitation probability cannot be quantified numerically. KEV status is negative - no confirmed active exploitation by CISA. However, the GHSA advisory includes a fully functional, copy-paste-ready PoC with exact payload and measured impact, making exploitation trivial for any attacker who can reach an application endpoint that forwards untrusted input to Shescape. Since flag protection is the default, the exposure is as wide as the library's deployment footprint - no misconfiguration is required. The primary real-world limiting factor is that an attacker must be able to supply unbounded input to a Shescape API call; applications enforcing input length limits before calling the library would not be exposed. |
| Exploit ScenarioDerived | An attacker submits an HTTP request body containing a string of 32,000 |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 12, 2026
Quadratic-time CPU exhaustion in Shescape's flag-protection loop allows any attacker who can supply untrusted input to the escape, escapeAll, quote, or quoteAll APIs to cause denial of service without authentication or special configuration. Affected npm package versions 2.1.11-2.1.13 and 3.0.0 are vulnerable by default because flagProtection is enabled in the default configuration. The GHSA advisory includes a working proof-of-concept demonstrating approximately 20 seconds of processing time for a 32,000-repeat null-dash payload, and patched releases 2.1.14 and 3.0.1 are available; no active exploitation has been confirmed (not in CISA KEV).
RemediationAI
Upgrade to shescape v2.1.14 or v3.0.1, both confirmed available as tagged releases at https://github.com/ericcornelissen/shescape/releases/tag/v2.1.14 and https://github.com/ericcornelissen/shescape/releases/tag/v3.0.1 respectively. The vendor recommends migrating to v3 given v2's end-of-life date of 2026-09-28; a migration guide is available in the Shescape repository. If an immediate upgrade is not feasible, two compensating controls are available per the vendor advisory: (1) restrict the maximum length of untrusted input before passing it to any Shescape API - this directly breaks the quadratic scaling but requires determining a safe bound for the application; or (2) strip all content before the last - character in untrusted inputs before processing - this is a narrower workaround that alters input and may not be appropriate for all use cases. Versions below 2.0.0 will not receive patches and must be upgraded.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Shescape is a Node.js npm library (package shescape, CPE: cpe:2.3:a:ericcornelissen:shescape:*:*:*:*:*:*:*:*, authored by ericcornelissen) that safely escapes shell arguments for child process calls. The root cause is CWE-400 (Uncontrolled Resource Consumption) in the compose function within src/internal/compose.js. When flagProtection is active, the pre-patch implementation splits the argument into fragments via flagFn, then enters a while-loop that calls rest.join('') on each iteration to reconstruct the string - an O(n) operation repeated O(n) times for n flag fragments, yielding O(n²) total complexity. An input of 32,000 \u0000- repetitions (each pair constituting a flag fragment boundary) drives approximately 20 seconds of CPU time per the PoC. The patch replaces this with an index-based traversal (for (; idx < fragments.length - 2; idx += 2)) followed by a single fragments.slice(idx).join('') call outside the loop, reducing complexity to O(n).
Know when Shescape gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Network-reachable via default configuration with no authentication (PR:N); sole impact is high availability loss from CPU exhaustion with no scope change.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Executive ViewAI
Shescape npm package versions 2.1.11-2.1.13 and 3.0.0 contain a denial-of-service vulnerability with publicly available exploit code that exhausts CPU resources through the default flag-protection APIs, causing application unavailability. Any organization using affected versions is at risk when processing untrusted input. Patched versions 2.1.14 and 3.0.1 are available and should be deployed immediately.
Vendor-released patch: version 2.1.14 and version 3.0.1. No interim mitigations are available; immediate patching is required to eliminate this denial-of-service risk.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Shescape is a simple shell escape package for JavaScript. Rated critical severity (CVSS 9.8), this vulnerability is remo
Shescape is a simple shell escape package for JavaScript. Rated critical severity (CVSS 9.8), this vulnerability is remo
shescape is simple shell escape library for JavaScript. Rated high severity (CVSS 8.6), this vulnerability is remotely e
shescape is a simple shell escape package for JavaScript. Rated high severity (CVSS 7.8), this vulnerability is low atta
The package shescape from 1.5.10 and before 1.6.1 are vulnerable to Regular Expression Denial of Service (ReDoS) via the
Shescape is a shell escape package for JavaScript. Rated high severity (CVSS 7.5), this vulnerability is remotely exploi
Shescape is a shell escape package for JavaScript. Rated medium severity (CVSS 5.5), this vulnerability is low attack co
Command injection in Shescape (npm shell-escaping library) versions below 2.1.14 and the 3.0.x line below 3.0.1 allows a
Shescape is a simple shell escape library for JavaScript. Rated medium severity (CVSS 4.3), this vulnerability is remote
Shescape versions prior to 2.1.10 fail to properly escape square-bracket glob patterns in Bash, BusyBox sh, and Dash, al
Incomplete Zsh special-character escaping in Shescape allows unauthenticated attackers who control input strings to bypa
Incomplete tilde-escaping in Shescape's Dash shell mode allows attacker-controlled input to bypass sanitization and trig
EUVD-2026-57527
GHSA-gm3r-q2wp-hw87
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB