CVE-2025-13437
published medium CVSS 4.0 · 5.6Arbitrary node_modules Directory Deletion in Google zx
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| — | zx8.8.4 · Other versions: unaffected | Affected | Not stated |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 5.6 / 10
- Severity
- medium
- Provider
- Google · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| zx | 8.8.4 (affected · semver)Default: unaffected | Google · cna |
Weaknesses
1- CWE-706 CWE-706 Use of Incorrectly-Resolved Name or Reference
References
1Provider assertions
2Google · cna
Arbitrary node_modules Directory Deletion in Google zx
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- b92d74e08b66a63bb5222f5a4a699b3f0a99ee604a7a9db5d48f594821f93339
- Ingested
- 23 Sep 2026, 08:37:10 UTC
- Source record
- Official CVE record