CVE-2025-30222 Details
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.
A vulnerability in Shescape, a shell escape library for JavaScript, allows for potential exposure of environment variables on Windows when using CMD. This issue affects Shescape versions 1.7.2 through 2.1.1. The vulnerability arises when users explicitly set the shell to 'cmd.exe' or enable the shell option, and utilize any of the quoting or escaping functions. An attacker could exploit this to gain read-only access to environment variables, such as the PATH variable.
Users can upgrade to Shescape version 2.1.2, which addresses this vulnerability. Those using version 1 of Shescape should follow the migration guide to upgrade to version 2.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Mar 25, 2025CISA-ADP
Assessed Mar 26, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/ericcornelissen/shescape/security/advisories/GHSA-66pp-5p9w-q87j | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://github.com/ericcornelissen/shescape/commit/0a81f1eb077bab8caae283a2490cd7be9af179c6 | [email protected] | Source CodeVendor |
| https://github.com/ericcornelissen/shescape/pull/1916 | [email protected] | Issue TrackingVendor |
| https://github.com/ericcornelissen/shescape/releases/tag/v2.1.2 | [email protected] | Release NotesVendor |
| https://github.com/ericcornelissen/shescape/security/advisories/GHSA-66pp-5p9w-q87j | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-200 | Exposure of Sensitive Information to an Unauthorized Actor | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| ericcornelissen shescape | >= 1.7.2, <= 2.1.1 (semver) |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 26, 2025 | CVE Modified | CISA-ADP |
| Mar 25, 2025 | New CVE Received | [email protected] |
Volerion