# CVE-2025-13437: Arbitrary node\_modules Directory Deletion in Google zx

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.6
- **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:U`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.13% (percentile 1, 2026-11-26)
- **CWE:** CWE-706
- **Aliases:** GHSA-w87r-vg9q-crqm
- **Published:** 2025-11-20T16:25:16.866Z
- **Modified:** 2026-10-18T20:10:00.110Z

## Who should check

- Projects that depend on npm package zx (\< 8.8.5)
- Anyone running Google zx 8.8.4

## 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

- npm `zx`: affected \< 8.8.5; fixed 8.8.5 (osv)
- Google zx: 8.8.4 (cvelist)

## Mitigation

- Upgrade zx to 8.8.5 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2025-13437>
- patch: <https://github.com/google/zx/pull/1349>
- patch: <https://github.com/google/zx/pull/1355>
- patch: <https://github.com/google/zx/commit/9ef6d3c9962c4ba01e3fb8075855570c192b4681>
- patch: <https://github.com/google/zx/commit/a4d1bc2467f305f1c91d62506e215f307dc1fbeb>
- other: <https://github.com/google/zx/issues/1348>
- other: <https://github.com/google/zx>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-13437>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-w87r-vg9q-crqm> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2025-13437> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-13437>
