Skip to main content
← All vulnerabilities
CVE-2025-13437GHSA-W87R-VG9Q-CRQM

Arbitrary node_modules Directory Deletion in Google zx

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 8.8.5
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • Google zx

    8.8.4

  • zxnpm

    fixed in 8.8.5

References 1

GitHub · google/zx