{"id":"CVE-2025-24959","published":"2025-02-03T20:48:16Z","modified":"2025-02-12T20:51:25Z","title":"Environment Variable Injection for dotenv API in zx","vendor":"Google","product":"zx","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":1,"severity":"LOW","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00176,"percentile":0.07329,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/google/zx/security/advisories/GHSA-qwp8-x4ff-5h87","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/google/zx/pull/1094","tags":["x_refsource_MISC"]}],"priority":{"score":2.2,"factors":[{"name":"EPSS percentile","points":1.47},{"name":"CVSS severity","points":0.7}]},"vendorSlug":"google","affectedVersions":[{"vendor":"google","product":"zx","versions":[">= 8.3.0, < 8.3.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-02-03T21:06:43.415122Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"zx","vulnerableRanges":[">=8.3.1, <8.3.2"],"patched":["8.3.2"],"from":["GHSA-qwp8-x4ff-5h87"],"provenance":"source"}],"summary":{"text":"The zx tool from Google contains an environment variable injection flaw in its dotenv API, where attacker-controlled environment variable values can inject unintended variables into process.env, particularly when untrusted input is passed through dotenv.stringify. An attacker with local access who can influence environment variable values, with user interaction and low-privilege authentication required under the attack vector, could cause arbitrary command execution or unexpected behaviour in applications relying on those variables for security-sensitive operations.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:23:50Z"},"euvd":{"id":"EUVD-2025-0220","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-24959","published":"2025-02-03","fixed":"8.3.2","kev":false},{"cve":"CVE-2025-13437","published":"2025-11-20","fixed":"8.8.5","kev":false,"link":{"from":"CVE-2025-24959","to":"CVE-2025-13437","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:zx","fromFixed":"8.3.2","toFixed":"8.8.5","daysApart":290}]}}],"package":"npm:zx"}}