# CVE-2025-30222: Shescape has potential environment variable exposure on Windows with CMD

- Severity: Low 2.1 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.30%, higher than 24% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-03-25T23:00:08.995Z
- Modified: 2026-09-10T03:50:22.897Z
- Also known as: GHSA-66pp-5p9w-q87j
- Weaknesses: CWE-200
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- ericcornelissen shescape: >= 1.7.2, < 2.1.2
- shescape (npm): from 1.7.2 before 2.1.2

## Every score

- GitHub_M: CVSS:4.0 2.1 Low `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`
- GitHub: CVSS:4.0 Low `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`

## References

- <https://github.com/ericcornelissen/shescape/security/advisories/GHSA-66pp-5p9w-q87j> (exploit, web)
- <https://github.com/ericcornelissen/shescape/pull/1916> (web)
- <https://github.com/ericcornelissen/shescape/commit/0a81f1eb077bab8caae283a2490cd7be9af179c6> (web)
- <https://github.com/ericcornelissen/shescape/releases/tag/v2.1.2> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-30222> (advisory)
- <https://github.com/ericcornelissen/shescape> (package)

## Sources

- CVE List: [CVE-2025-30222](https://www.cve.org/CVERecord?id=CVE-2025-30222), CVE Terms of Use, modified 2025-03-26
- GitHub Advisory Database: [GHSA-66pp-5p9w-q87j](https://github.com/advisories/GHSA-66pp-5p9w-q87j), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-30222](https://nvd.nist.gov/vuln/detail/CVE-2025-30222), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-30222 · Whole record: https://cve.day/CVE-2025-30222.json · Rebuilt by cve.day 2026-11-25T22:58:55.513Z
