CVE-2025-30222 json
Shescape has potential environment variable exposure on Windows with CMD
published 2025-03-25 19 mo ago modified 2026-09-10 1 mo ago also EUVD-2025-8207 , GHSA-66pp-5p9w-q87j
- cvss
- 2.1
- version 4.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 9%
- public exploits
- 0
- none known
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.
Patch / fix
- npm shescape 2.1.2
- shescape_project shescape 2.1.2
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 19 mo ago
Exploit prediction
0.19% chance of exploitation in the next 30 days, higher than 9% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/ericcornelissen/shescape/security/advisories/GHSA-66pp-5p9w-q87j referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 2.1 | CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:U |
| CNA | 4.0 | 2.1 | CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:U/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | shescape | >=1.7.2, <2.1.2 |
2.1.2 |
Affected products
- ericcornelissen shescape
Classification
- Weakness
-
- CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
References
-
github.com
/ericcornelissen/shescape/pull/1916
web
-
github.com
/ericcornelissen/shescape/commit/0a81f1eb077bab8caae283a2490cd7be9af179c6
web
-
github.com
/ericcornelissen/shescape/security/advisories/GHSA-66pp-5p9w-q87j
exploit, web
-
github.com
/ericcornelissen/shescape/releases/tag/v2.1.2
web
-
nvd.nist.gov
/vuln/detail/CVE-2025-30222
advisory
-
github.com
/ericcornelissen/shescape
package
Sources
- CVE List CVE-2025-30222
- GitHub Advisory GHSA-66pp-5p9w-q87j
- NVD CVE-2025-30222
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.