CVE-2025-13437 Arbitrary node_modules Directory Deletion in Google zx
MediumCVSS 5.6
EPSS 0.09%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: partial
- Technology
- Red Hat
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.
Upgrade path
3 packages: 1 fixed, 1 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| redhat/openshift4/ose-agent-installer-ui-rhel9(Red Hat openshift 4) | All versions | No fix listed | No fix yet |
| npm zx(npm) | < 8.8.5 | 8.8.5 | Fixed |
| Google zx | = 8.8.4 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| npm zx(npm) | < 8.8.5 | 8.8.5 |
| Google zx | = 8.8.4 | No fix listed |
| redhat/openshift4/ose-agent-installer-ui-rhel9(Red Hat:openshift:4) | All versions | No fix listed |
References
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com
- github.com patch
- github.com patch
- github.com patch
- github.com patch
- github.com
- Red Hat CVE page mitigation vendor-advisory
- Red Hat Bugzilla 2416152 issue-tracking
- www.cve.org
- github.com product