cve.bz

CVE-2025-13437

5.6 mediumEPSS 0.09%

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.

CVSS 4.0
5.6CVSS: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
EPSS
0.09% chance of exploitation in the next 30 days; higher than 0% of CVEs (scores of 2026-10-25)
CWE
CWE-706
Published
Modified
Record from
the NVD, synced

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-w87r-vg9q-crqmnpmzx<8.8.58.8.5

References

Check your stackJSON