# CVE-2025-24959: Environment Variable Injection for dotenv API in zx

- Severity: Low 1.0 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N`
- 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.26%, higher than 11% of CVEs (2026-11-30)
- Published: 2025-02-03T20:48:16.507Z
- Modified: 2026-06-17T08:59:53.010Z
- Also known as: GHSA-qwp8-x4ff-5h87
- Weaknesses: CWE-74, CWE-94
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

zx is a tool for writing better scripts. An attacker with control over environment variable values can inject unintended environment variables into `process.env`. This can lead to arbitrary command execution or unexpected behavior in applications that rely on environment variables for security-sensitive operations. Applications that process untrusted input and pass it through `dotenv.stringify` are particularly vulnerable. This issue has been patched in version 8.3.2. Users should immediately upgrade to this version to mitigate the vulnerability. If upgrading is not feasible, users can mitigate the vulnerability by sanitizing user-controlled environment variable values before passing them to `dotenv.stringify`. Specifically, avoid using `"`, `'`, and backticks in values, or enforce strict validation of environment variables before usage.

(As written by CVE List.)

## Affected

- google zx: >= 8.3.0, < 8.3.2
- zx (npm): from 8.3.1 before 8.3.2

## Every score

- GitHub_M: CVSS:4.0 1.0 Low `CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N`
- GitHub: CVSS:3.1 5.2 Medium `CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H`

## References

- <https://github.com/google/zx/security/advisories/GHSA-qwp8-x4ff-5h87> (web)
- <https://github.com/google/zx/pull/1094> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-24959> (advisory)
- <https://github.com/google/zx/commit/5ba714d14ecf0555a74d4db96622840ac19839c5> (web)
- <https://github.com/google/zx> (package)
- <https://github.com/webpod/envapi/blob/v0.2.1/src/main/ts/envapi.ts#L74-L77> (web)

## Sources

- CVE List: [CVE-2025-24959](https://www.cve.org/CVERecord?id=CVE-2025-24959), CVE Terms of Use, modified 2025-02-12
- GitHub Advisory Database: [GHSA-qwp8-x4ff-5h87](https://github.com/advisories/GHSA-qwp8-x4ff-5h87), CC-BY-4.0, modified 2025-02-04
- NVD: [CVE-2025-24959](https://nvd.nist.gov/vuln/detail/CVE-2025-24959), Public domain, modified 2026-06-17

---

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