CVE-2025-24959 Details
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.
A vulnerability allowing environment variable injection has been identified in Google zx version 8.3.1. This issue arises in the dotenv API, where an attacker can manipulate environment variable values to inject unintended variables into process.env. Such injection can lead to arbitrary command execution or unexpected behavior in applications that depend on environment variables for security-sensitive tasks. The vulnerability is particularly pronounced in applications that handle untrusted input and use dotenv.stringify, as these conditions create an opportunity for exploitation.
Users are advised to upgrade to Google zx version 8.3.2 or later. If an immediate upgrade is not possible, the vulnerability can be mitigated by sanitizing user-controlled environment variable values before passing them to dotenv.stringify. Specifically, avoid using double quotes, single quotes, backticks, or enforce strict validation of environment variables before use.
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 Feb 3, 2025CISA-ADP
Assessed Feb 3, 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/google/zx/pull/1094 | [email protected] | Issue TrackingVendor |
| https://github.com/google/zx/security/advisories/GHSA-qwp8-x4ff-5h87 | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| google/zx | All versions |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Feb 3, 2025 | New CVE Received | [email protected] |
Volerion