CVE-2025-13437
Arbitrary node_modules Directory Deletion in Google zx
Also known as GHSA-w87r-vg9q-crqm
Mitigation
- Upgrade zx to 8.8.5 or later.
Who should check
- Projects that depend on npm package zx (< 8.8.5)
- Anyone running Google zx 8.8.4
Vulnerability facts
- Affected
- zx < 8.8.5
- Fixed in
- 8.8.5
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 5.6 (v4.0, CNA)CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:H/SC:N/SI:H/SA:H/E:UOpen in CVSS calculator
Show all 12 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Attack requirements: None
- Privileges required: None
- User interaction: Active
- Confidentiality impact: None
- Integrity impact: High
- Availability impact: High
- Confidentiality impact on other systems: None
- Integrity impact on other systems: High
- Availability impact on other systems: High
- Exploit maturity: Unreported
- EPSS
- 0.13% chance of exploitation in 30 days (percentile 1, 2026-11-26)
- CWE
- CWE-706
- Modified
Description
When zx is invoked with --prefer-local=<path>, the CLI creates a symlink named ./node_modules pointing to <path>/node_modules. Due to a logic error in src/cli.ts (linkNodeModules / cleanup), the function returns the target path instead of the alias (symlink path). The later cleanup routine removes what it received, which deletes the target directory itself. Result: zx can delete an external <path>/node_modules outside the current working directory.
Affected and fixed versions
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-13437. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-13437.md Affected: zx < 8.8.5 Fixed in: 8.8.5 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
Vendor advisories
Patches
FAQ
Is CVE-2025-13437 being exploited?
There is no confirmed exploitation: CVE-2025-13437 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.13% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-13437?
Medium: CVSS 5.6 (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-13437?
zx < 8.8.5.
Is there a fix for CVE-2025-13437?
Yes. Fixed in 8.8.5. Upgrade zx to 8.8.5 or later.
How do I check if I'm affected by CVE-2025-13437?
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.