CVE-2025-13437: Google zx · Use of Incorrectly-Resolved Name or Reference
Affects Google zxSource CVE Database V5
Not known to be exploited · CVSS 5.6 Medium.
Data as of 26 Oct 2026, 14:05 UTC
- EPSS
- 0.09% chance of exploitation in 30 days – higher than 0% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
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:UExploitation evidence
Disclosed: evidence found.
CVE published 20 Nov 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
npmgoogle/zxpkg:npm/google/zxOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
To mitigate CVE-2025-13437, organizations should avoid using the --prefer-local option with Google zx version 8.8.4 until a patched version is available. If usage is necessary, ensure that the <path> specified does not point to critical or shared node_modules directories outside isolated environments. Implement strict filesystem permissions and access controls to limit the ability of scripts to delete important directories. Use containerized or sandboxed environments for running zx scripts to contain potential damage. Monitor filesystem changes in development and CI/CD environments to detect unexpected deletions promptly. Regularly back up node_modules directories or use package-lock.json and package manifests to quickly restore dependencies. Stay updated with Google zx releases and apply patches once available. Additionally, conduct code reviews and static analysis on scripts invoking zx with --prefer-local to identify risky usage patterns. Educate developers about the risks of this option and enforce usage policies accordingly.
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.