zx Uses Incorrectly-Resolved Name or Reference
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 software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | zx | < 8.8.5 | 8.8.5 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2025-13437
- https://github.com/google/zx/issues/1348
- https://github.com/google/zx/pull/1349
- https://github.com/google/zx/pull/1355
- https://github.com/google/zx/commit/9ef6d3c9962c4ba01e3fb8075855570c192b4681
- https://github.com/google/zx/commit/a4d1bc2467f305f1c91d62506e215f307dc1fbeb
- https://github.com/google/zx
- CVSS 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- Weakness (CWE)
CWE-706- Platform
- npm
- Package
zx- Disclosed
- 20.11.2025
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-w87r-vg9q-crqm - CC BY 4.0
Vulnerability history: zx
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 2
- First → latest
- 02.2025 11.2025
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Medium 2
Disclosures per year
- 2025: 2
- 2026: 0
-
zx Uses Incorrectly-Resolved Name or Reference this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.