CVE-2026-73414 in Shescape
Summary
by MITRE • 08/12/2026
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.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 08/12/2026
The shescape library presents a critical command injection vulnerability that affects JavaScript applications relying on shell escaping functionality on Windows systems. This vulnerability stems from insufficient handling of special characters during shell escape operations, specifically failing to properly escape parentheses characters in command-line arguments. The flaw exists within the getEscapeFunction implementation located in src/internal/win/cmd.js and impacts versions prior to 2.1.14 and 3.0.1, creating a pathway for attackers to manipulate shell execution flows through carefully crafted input data.
The technical flaw manifests when applications utilize the escape or escapeAll APIs on Windows systems with cmd.exe as the target shell or when shell is set to true while CMD serves as the default shell. The root cause lies in the incomplete escaping of parentheses characters, which are fundamental components of command grouping and subshell execution in Windows CMD. When these characters are not properly escaped, attacker-controlled input can break out of existing parenthesized constructs within command executions, allowing malicious code injection that leverages the shell's native capabilities for command composition and execution.
The operational impact of this vulnerability extends beyond simple privilege escalation to encompass full arbitrary command execution capabilities. Attackers can exploit this weakness by crafting inputs that manipulate the shell environment through parenthesis injection, potentially executing unauthorized commands with the privileges of the affected application. This represents a direct violation of the principle of least privilege and can lead to complete system compromise depending on the application's execution context and access rights. The vulnerability aligns with CWE-78 which specifically addresses improper neutralization of special elements used in OS commands, and maps to ATT&CK technique T1059.003 for command and scripting interpreter execution.
Mitigation strategies should prioritize immediate upgrading to shescape versions 2.1.14 or 3.0.1 where the parentheses escaping issue has been resolved. Organizations should also implement comprehensive input validation and sanitization measures at application boundaries, particularly when handling user-supplied data that may eventually reach shell execution contexts. Additional protective measures include employing runtime monitoring solutions that can detect anomalous command execution patterns and implementing strict access controls to limit the potential impact of successful exploitation attempts. Security teams should conduct thorough code reviews focusing on shell escape implementations and establish automated testing protocols to verify proper escaping behavior across different shell environments, particularly in Windows-based systems where this vulnerability is most pronounced.