CVE-2025-30222
Shescape has potential environment variable exposure on Windows with CMD
Also known as GHSA-66pp-5p9w-q87j
Mitigation
- Upgrade shescape to 2.1.2 or later.
Who should check
- Projects that depend on npm package shescape (>= 1.7.2, < 2.1.2)
- Anyone running ericcornelissen shescape >= 1.7.2, < 2.1.2
Vulnerability facts
- Affected
- shescape >= 1.7.2, < 2.1.2
- Fixed in
- 2.1.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 2.1 (v4.0, CNA)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:UOpen in CVSS calculator
Show all 12 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Attack requirements: Present
- Privileges required: None
- User interaction: None
- Confidentiality impact: High
- Integrity impact: None
- Availability impact: None
- Confidentiality impact on other systems: None
- Integrity impact on other systems: None
- Availability impact on other systems: None
- Exploit maturity: Unreported
- EPSS
- 0.30% chance of exploitation in 30 days (percentile 15, 2026-11-26)
- CWE
- CWE-200
- Modified
Description
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm shescape | >= 1.7.2, < 2.1.2 | 2.1.2 | osv |
| ericcornelissen shescape | >= 1.7.2, < 2.1.2 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-30222. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-30222.md Affected: shescape >= 1.7.2, < 2.1.2 Fixed in: 2.1.2 Steps: 1. Search this machine and project for shescape (npm), ericcornelissen shescape: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
FAQ
Is CVE-2025-30222 being exploited?
There is no confirmed exploitation: CVE-2025-30222 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-30222?
Low: CVSS 2.1 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2025-30222?
shescape >= 1.7.2, < 2.1.2.
Is there a fix for CVE-2025-30222?
Yes. Fixed in 2.1.2. Upgrade shescape to 2.1.2 or later.
How do I check if I'm affected by CVE-2025-30222?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.