Shescape has potential environment variable exposure on Windows with CMD
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-200.
Summary
Shescape is a simple shell escape library for JavaScript. Versions 1.7.2 through 2.1.1 are vulnerable to potential environment variable exposure on Windows with CMD. This impact users of Shescape on Windows that explicitly configure `shell: 'cmd.exe'` or `shell: true` using any of `quote`/`quoteAll`/`escape`/`escapeAll`. An attacker may be able to get read-only access to environment variables. This bug has been patched in v2.1.2. For those who are already using v2 of Shescape, no further changes are required. Those who are are using v1 of Shescape should follow the migration guide to upgrade to v2. There is no plan to release a patch compatible with v1 of Shescape. As a workaround, users can remove all instances of `%` from user input before using Shescape.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- 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 | 1.7.2 to before 2.1.2 | 2.1.2 | Patch available | CNA |
| — | shescape (npm) | 1.7.2 to before 2.1.2 | 2.1.2 | Patch available | GHSA-66pp-5p9w-q87j |
- shescape Vendorericcornelissen Affected 1.7.2 to before 2.1.2 Fixed in 2.1.2 Patch available CNA
- shescape (npm) Vendor— Affected 1.7.2 to before 2.1.2 Fixed in 2.1.2 Patch available GHSA-66pp-5p9w-q87j
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.2
- Fix · GHSA-66pp-5p9w-q87j shescape (npm) Fixed in 2.1.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2025-30222
- 2026-10-03 Alias added: GHSA-66pp-5p9w-q87j
References
Other 5
- https://github.com/ericcornelissen/shescape/security/advisories/GHSA-66pp-5p9w-q87j
- https://github.com/ericcornelissen/shescape/pull/1916
- https://github.com/ericcornelissen/shescape/commit/0a81f1eb077bab8caae283a2490cd7be9af179c6
- https://github.com/ericcornelissen/shescape/releases/tag/v2.1.2
- https://github.com/ericcornelissen/shescape
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-2025-30222 · CVE Program
- CVE-2025-30222 · NVD
- FIRST EPSS
- GHSA-66pp-5p9w-q87j · 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