{"answers":{"affected":"2 open source packages ship an affected version, including zx.","exploited":"There is no known exploitation of CVE-2025-24959 in the wild and no public exploit code.","fix":"Upgrade zx to 8.3.2 or later.","what":"CVE-2025-24959 is a low-severity code injection vulnerability in google zx, published on 3 Feb 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-24959 and fix it if it is affected.\n\nWhat it is: CVE-2025-24959 is a low-severity code injection vulnerability in google zx, published on 3 Feb 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2025-24959 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- zx (npm): affected from 8.3.1; fixed in 8.3.2\n- zx (npm): affected from 8.3.1; fixed in 8.3.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-24959/ (Markdown: https://insights.sbomify.com/CVE-2025-24959/index.md)","id":"CVE-2025-24959","markdown":"https://insights.sbomify.com/CVE-2025-24959/index.md","name":"CVE-2025-24959","record":{"aliases":["GHSA-qwp8-x4ff-5h87","UBUNTU-CVE-2025-24959"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"JavaScript scripting tool","requires_auth":"low_privilege","summary":"Attackers can inject environment variables via dotenv.stringify in zx, leading to arbitrary command execution in dependent applications.","user_interaction":"required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":1,"severity":"low","source":"cna","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","version":"4.0"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Environment Variable Injection for dotenv API in zx","id":"CVE-2025-24959","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"code_injection","year":"2025"},"n_packages":2,"n_references":2,"next":{"headline":"Missing Input validation for filename in backups endpoint in Jellystat","id":"CVE-2025-24960"},"packages":[{"ecosystem":"npm","fixed":["8.3.2"],"introduced":["8.3.1"],"last_affected":[],"package":"zx","purl":null,"source":"GHSA-qwp8-x4ff-5h87"},{"ecosystem":"npm","fixed":["8.3.2"],"introduced":["8.3.1"],"last_affected":[],"package":"zx","purl":"pkg:npm/zx","source":"GHSA-qwp8-x4ff-5h87"}],"prev":{"headline":"SQL Injection endpoint 'salvar_tag.php' parameter 'id_tag' in WeGIA","id":"CVE-2025-24958"},"products":["zx"],"published":"2025-02-03","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-02-12","vendors":["google"]},"summary":"Attackers can inject environment variables via dotenv.stringify in zx, leading to arbitrary command execution in dependent applications.","url":"https://insights.sbomify.com/CVE-2025-24959/"}