Skip to content

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.

PackageAffectedFixed inStatus
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

ProductAffected versionsFixed 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