CVE-2025-13437

MEDIUMCVSS 5.6/10EPSS 0.08%

Last modified

CVE-2025-13437 is a medium-severity vulnerability rated 5.6/10 on the CVSS scale. 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). EPSS estimates a 0.08% chance of exploitation in the next 30 days.

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.

Metrics

Weakness Enumeration

References

Timeline

Published
Last Modified
Status
Deferred

Frequently Asked Questions

What is CVE-2025-13437?
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.
How severe is CVE-2025-13437?
CVE-2025-13437 has a CVSS score of 5.6/10 (MEDIUM severity). The EPSS model estimates a 0.08% probability of exploitation in the next 30 days.
How do I fix CVE-2025-13437?
Check the vendor references and advisories linked above for patched versions and mitigation guidance. You can also run a Strix scan to test if your systems are affected.

How Strix Helps

Related CVEs from 2025

Are you affected by CVE-2025-13437?

Run a free Strix scan to check your systems for this vulnerability.

Scan your code now

Source: NVD / NIST