Skip to main content

Shescape EUVDEUVD-2026-57531

| CVE-2026-73414 CRITICAL
OS Command Injection (CWE-78)
2026-08-12 GitHub_M GHSA-w4hw-qcx7-56pr
9.2
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted argument to Windows app
  2. Delivery
    App escapes input via Shescape escape/escapeAll
  3. Exploit
    Unescaped ')' breaks out of CMD parenthesized block
  4. Execution
    Injected CMD syntax parsed as new commands
  5. Impact
    Arbitrary command execution on host

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK

2 techniques across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires all of the following concrete prerequisites: (1) the target application runs on Windows; (2) it uses Shescape's escape or escapeAll API; (3) it invokes child_process with shell set to 'cmd.exe', or shell:true while CMD is the system default shell; and (4) the escaped attacker input is placed inside a parenthesized CMD construct (e.g. an if/else block using '(...)') in the original command - this is the exact condition captured by the CVSS AT:P (Attack Requirements: Present) flag. Limiting factors: applications on Unix shells, on PowerShell, or that pass arguments as an argv array (not through CMD) are not affected; and if the surrounding command never wraps the argument in parentheses, the breakout construct has nothing to escape from. No user authentication or interaction is required by the library itself (PR:N/UI:N), but whether the tainted input is remotely reachable is a property of the host application.

Impact

The CVSS 4.0 base score of 9.2 (Critical) reflects a network-reachable, no-privilege, no-interaction path to full C/I/A compromise, but the Attack Requirements flag (AT:P) is the key nuance: exploitation is not universal - it depends on the consuming application actually running on Windows with CMD and embedding the escaped argument inside a parenthesized CMD construct. That makes real-world exploitability conditional on how each downstream app uses the library, so this is better characterized as a serious-but-context-dependent library flaw than a blanket internet-wide RCE. The vendor advisory ships a concrete working payload ('x) else if a==a (echo y'), which meaningfully lowers the barrier to exploitation for affected deployments, yet there is no EPSS figure provided and no CISA KEV entry, so I cannot assert widespread or active exploitation. On balance, any team shipping a Windows product that passes untrusted input through Shescape's escape/escapeAll with CMD should treat patching as urgent, while teams on non-Windows shells or not using the CMD backend face materially lower real risk. Note the data conflict to verify: the raw CVSS asserts AV:N/PR:N/UI:N (unauthenticated remote), but whether input is remotely reachable is entirely a property of the host application, not the library itself.

Exploit ScenarioDerived

A Windows-hosted Node.js application takes a user-supplied value (e.g. a form field or API parameter), escapes it with shescape.escape, and interpolates it into a cmd.exe command that wraps the value in parentheses such as 'if defined FALSY (echo <input>)'. An attacker submits 'x) else if a==a (echo y', whose unescaped ) closes the CMD block early and injects attacker-chosen syntax, causing the shell to execute unintended commands. A working payload demonstrating this is published in the GHSA advisory, and the low attack complexity means it succeeds reliably once the parenthesized-construct precondition is met.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 12, 2026

Command injection in Shescape (npm shell-escaping library) versions below 2.1.14 and the 3.0.x line below 3.0.1 allows an attacker-controlled argument to break out of a parenthesized cmd.exe construct and inject arbitrary shell syntax on Windows. The flaw affects applications that call the escape or escapeAll APIs with shell set to cmd.exe (or shell:true when CMD is the default), because getEscapeFunction in src/internal/win/cmd.js failed to escape the ( and ) characters. A working proof-of-concept payload is published in the vendor advisory; there is no CISA KEV listing and no evidence of active exploitation at time of analysis.

RemediationAI

Vendor-released patch: upgrade to Shescape 2.1.14 (v2 line) or 3.0.1 (v3 line). Applications already on v3 need only bump to 3.0.1 with no code changes; v2 users should note that v2 reaches end-of-life on 2026-09-28 and follow the vendor migration guide to move to v3. If you cannot upgrade immediately, the vendor-documented workaround is to strip all ( and ) characters from untrusted input before passing it to Shescape (trade-off: this alters argument content and may break legitimate inputs that contain parentheses). An additional compensating control is to avoid the CMD backend where feasible - switch the child_process shell to PowerShell or run without shell:true so arguments are passed as an argv array rather than a CMD string, which removes the vulnerable code path (trade-off: may change quoting/behavior for commands that rely on CMD-specific features). Advisory and fix references: https://github.com/ericcornelissen/shescape/security/advisories/GHSA-w4hw-qcx7-56pr, https://github.com/ericcornelissen/shescape/pull/2649, https://github.com/ericcornelissen/shescape/pull/2651.

Affected VersionsENISA

shescape 3.0.0, < 3.0.1
shescape < 2.1.14

Affected Packages

npm shescape fix: 2.1.14, 3.0.1

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 JavaScript/Node.js library whose entire purpose is to neutralize shell metacharacters in untrusted arguments before they are passed to a shell via child_process. The defect is a classic CWE-78 (OS Command Injection) escaping gap specific to the Windows CMD backend: the special-character regex in src/internal/win/cmd.js matched %, &, <, >, ^ and | but omitted the grouping parentheses ( and ). In cmd.exe, parentheses delimit command blocks (e.g. if defined X (…) else (…)), so an unescaped ) closes the block early and lets subsequent tokens be interpreted as new CMD syntax. The fix (PRs #2649/#2651, commits 43d70b5 and b4b34c3) simply adds ( and ) to the specials regex - /([%&()<>^|])/g - and the same release also hardened unrelated Unix escaping for ~, #, ^ in Dash and Zsh. The affected CPE is cpe:2.3:a:ericcornelissen:shescape.

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

Vendor (GitHub_M) PRIMARY 9.2 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 8.1 HIGH

AC:H because exploitation requires the app to use the CMD backend and embed input in a parenthesized construct; PR:N/UI:N as the library imposes no auth; full C/I/A from arbitrary command execution.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 12, 2026 - 21:17 EUVD
CVE Published
Aug 12, 2026 - 19:42 cve.org
CRITICAL 9.2

DescriptionCVE.org

Shescape is a simple shell escape library for JavaScript. Prior to 2.1.14 and 3.0.1, getEscapeFunction in src/internal/win/cmd.js does not escape ( and ) when applications use the escape or escapeAll APIs on Windows with shell set to cmd.exe, or with shell set to true when CMD is the default. An attacker-controlled argument can break out of a parenthesized CMD construct and inject shell syntax depending on the original command, resulting in arbitrary command execution. This issue is fixed in versions 2.1.14 and 3.0.1.

Executive ViewAI

Why It Matters

A critical command injection flaw in Shescape (a popular Windows shell-escaping library for Node.js) defeats application injection protections, enabling remote code execution in affected systems; publicly available exploit code exists in the vendor advisory. Versions 2.1.13 and earlier, and 3.0.0, fail to properly escape shell metacharacters, allowing attackers to inject arbitrary commands via crafted input. With no patch available, any Windows-based Node.js application depending on this library faces immediate risk.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: restrict network access to affected Windows applications; add application-level input validation on arguments passed to Shescape; migrate to PowerShell (with appropriate escaping) where operationally feasible; isolate affected systems using network segmentation; implement security event monitoring on cmd.exe process spawning.

Threat Intelligence Overview

EPSS Score
0.5%
Top 61% exploitable
Prevalence
Low
niche npm shell-escaping library; Windows+CMD usage narrows footprint further
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

CVE-2022-31180 CRITICAL POC
9.8 Aug 01

Shescape is a simple shell escape package for JavaScript. Rated critical severity (CVSS 9.8), this vulnerability is remo

CVE-2022-31179 CRITICAL POC
9.8 Aug 01

Shescape is a simple shell escape package for JavaScript. Rated critical severity (CVSS 9.8), this vulnerability is remo

CVE-2023-40185 HIGH POC
8.6 Aug 23

shescape is simple shell escape library for JavaScript. Rated high severity (CVSS 8.6), this vulnerability is remotely e

CVE-2021-21384 HIGH POC
7.8 Mar 19

shescape is a simple shell escape package for JavaScript. Rated high severity (CVSS 7.8), this vulnerability is low atta

CVE-2022-25918 HIGH POC
7.5 Oct 27

The package shescape from 1.5.10 and before 1.6.1 are vulnerable to Regular Expression Denial of Service (ReDoS) via the

CVE-2022-36064 HIGH POC
7.5 Sep 06

Shescape is a shell escape package for JavaScript. Rated high severity (CVSS 7.5), this vulnerability is remotely exploi

CVE-2022-24725 MEDIUM POC
5.5 Mar 03

Shescape is a shell escape package for JavaScript. Rated medium severity (CVSS 5.5), this vulnerability is low attack co

CVE-2026-73413 HIGH
8.7 Aug 12

Quadratic-time CPU exhaustion in Shescape's flag-protection loop allows any attacker who can supply untrusted input to t

CVE-2023-35931 MEDIUM POC
4.3 Jun 23

Shescape is a simple shell escape library for JavaScript. Rated medium severity (CVSS 4.3), this vulnerability is remote

CVE-2026-32094 MEDIUM
6.5 Mar 11

Shescape versions prior to 2.1.10 fail to properly escape square-bracket glob patterns in Bash, BusyBox sh, and Dash, al

CVE-2026-73412 MEDIUM
6.3 Aug 12

Incomplete Zsh special-character escaping in Shescape allows unauthenticated attackers who control input strings to bypa

CVE-2026-73411 MEDIUM
6.3 Aug 12

Incomplete tilde-escaping in Shescape's Dash shell mode allows attacker-controlled input to bypass sanitization and trig

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy