Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2025-24959

LOW 1.0EPSS 11%

Environment Variable Injection for dotenv API in zx

Also known as GHSA-qwp8-x4ff-5h87

Mitigation

  • Upgrade zx to 8.3.2 or later.

Who should check

  • Projects that depend on npm package zx (>= 8.3.1, < 8.3.2)
  • Anyone running google zx >= 8.3.0, < 8.3.2

Vulnerability facts

Affected
zx >= 8.3.1, < 8.3.2
Fixed in
8.3.2
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
1.0 (v4.0, CNA)CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
  • Attack vector: Local
  • Attack complexity: Low
  • Attack requirements: Present
  • Privileges required: Low
  • User interaction: Active
  • Confidentiality impact: Low
  • Integrity impact: Low
  • Availability impact: Low
  • Confidentiality impact on other systems: None
  • Integrity impact on other systems: None
  • Availability impact on other systems: None
EPSS
0.26% chance of exploitation in 30 days (percentile 11, 2026-11-26)
CWE
CWE-94
Published
Modified

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.

Affected and fixed versions

Package / productAffectedFixedSource
npm zx>= 8.3.1, < 8.3.28.3.2osv
google zx>= 8.3.0, < 8.3.2—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2025-24959. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-24959.md
Affected: zx >= 8.3.1, < 8.3.2
Fixed in: 8.3.2

Steps:
1. Search this machine and project for zx (npm), google zx: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2025-24959 being exploited?

There is no confirmed exploitation: CVE-2025-24959 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.26% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2025-24959?

Low: CVSS 1.0 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

Which versions are affected by CVE-2025-24959?

zx >= 8.3.1, < 8.3.2.

Is there a fix for CVE-2025-24959?

Yes. Fixed in 8.3.2. Upgrade zx to 8.3.2 or later.

How do I check if I'm affected by CVE-2025-24959?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors