Every CVE Search/ Get API key

CVE-2025-24959

Environment Variable Injection for dotenv API in zx

1.0 LowFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
Low
User interaction
Active

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
Low

Exploit likelihood

0.18%Up 0.1 points since Feb 4, 2025
90%50%10%1%

What each source reports

CVE List Score used 1.0

Environment Variable Injection for dotenv API in zx

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.

Record
CVE-2025-24959
CVSS 4.0
1.0 LowCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
Weakness
CWE-94
Updated
2026-11-02
EUVDEUVD-2025-0220 1.0

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.

Record
EUVD-2025-0220
CVSS 4.0
1.0 LowCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
Updated
2026-11-03
GitHub AdvisoriesGHSA-qwp8-x4ff-5h87 5.2

ZX Allows Environment Variable Injection for dotenv API

Impact

This vulnerability is an Environment Variable Injection issue in dotenv.stringify, affecting google/zx version 8.3.1.

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.

Patches

This issue has been patched in version 8.3.2. Users should immediately upgrade to this version to mitigate the vulnerability.

Workarounds

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.

References

Record
GHSA-qwp8-x4ff-5h87
CVSS 3.1
5.2 MediumCVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H
Weakness
CWE-74
Updated
2026-11-02
NVD 1.0

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.

Record
CVE-2025-24959
CVSS 4.0
1.0 LowCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Weakness
CWE-94
Updated
2026-11-02
OSV 1.0

Environment Variable Injection for dotenv API in zx

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.

Record
CVE-2025-24959
CVSS 4.0
1.0 LowCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
Weakness
CWE-94
Updated
2026-11-02
OSVGHSA-qwp8-x4ff-5h87 5.2

ZX Allows Environment Variable Injection for dotenv API

Impact

This vulnerability is an Environment Variable Injection issue in dotenv.stringify, affecting google/zx version 8.3.1.

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.

Patches

This issue has been patched in version 8.3.2. Users should immediately upgrade to this version to mitigate the vulnerability.

Workarounds

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.

References

Record
GHSA-qwp8-x4ff-5h87
CVSS 3.1
5.2 MediumCVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H
Weakness
CWE-74
Updated
2026-11-02
OSVUBUNTU-CVE-2025-24959 1.0

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.

Record
UBUNTU-CVE-2025-24959
CVSS 4.0
1.0 LowCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
zx
npm
8.3.1 to 8.3.1
8.3.2
zx
npm
8.3.1 up to 8.3.2
8.3.2
node-zx
Ubuntu:24.04:LTS
All versions, plus listed versions
7.1.1+~cs6.7.23-27.1.1+~cs6.7.23-3
None known
node-zx
Ubuntu:25.10
All versions, plus listed versions
7.1.1+~cs6.7.23-3
None known
node-zx
Ubuntu:26.10
All versions, plus listed versions
7.1.1+~cs6.7.23-37.1.1+~cs6.7.23-4
None known
node-zx
Ubuntu:26.04:LTS
All versions, plus listed versions
7.1.1+~cs6.7.23-3
None known

History

History
RecordedChangedSources
aliases, publishedEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-24959 is a low vulnerability (CVSS 1.0) in Google Zx, published February 3, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.18%, the 7th percentile. Fixed in zx 8.3.2.

References

Show 4 moreShow less
MoveEnter Open