Environment Variable Injection for dotenv API in zx
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- Active
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Code execution
- Confidentiality · integrity · availability
- Low · Low · Low
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-94.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| zx | 8.3.0 to before 8.3.2 | 8.3.2 | Patch available | CNA | |
| — | zx (npm) | 8.3.1 to before 8.3.2 | 8.3.2 | Patch available | GHSA-qwp8-x4ff-5h87 |
- zx VendorGoogle Affected 8.3.0 to before 8.3.2 Fixed in 8.3.2 Patch available CNA
- zx (npm) Vendor— Affected 8.3.1 to before 8.3.2 Fixed in 8.3.2 Patch available GHSA-qwp8-x4ff-5h87
Remediation
- Fix · CNA zx (google) Fixed in 8.3.2
- Fix · GHSA-qwp8-x4ff-5h87 zx (npm) Fixed in 8.3.2 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2025-24959
- 2026-10-03 Alias added: GHSA-qwp8-x4ff-5h87
References
More Google vulnerabilities
- TI-2025-09686 Type confusion in Google Chrome KEVCVSS 3.1CRITICAL 9.8
- TI-2024-07390 Type confusion in Google Chrome KEVCVSS 3.1CRITICAL 9.6
- TI-2024-04898 Type confusion in Google Chrome KEVCVSS 3.1CRITICAL 9.6
- TI-2024-04600 Type confusion in Google Chrome KEVCVSS 3.1CRITICAL 9.6
- TI-2024-04346 Use after free in Google Chrome KEVCVSS 3.1CRITICAL 9.6
- TI-2023-05824 Integer overflow in Google Chrome KEVCVSS 3.1CRITICAL 9.6
Sources
- CVE-2025-24959 · CVE Program
- CVE-2025-24959 · NVD
- FIRST EPSS
- GHSA-qwp8-x4ff-5h87 · GitHub Advisory Database · CC BY 4.0
- CVE-2025-24959 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences