{"id":"CVE-2025-13437","published":"2025-11-20T16:25:16Z","modified":"2025-11-20T16:49:32Z","title":"Arbitrary node_modules Directory Deletion in Google zx","vendor":"Google","product":"zx","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.6,"severity":"MEDIUM","version":"4.0","vector":"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:U","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00091,"percentile":0.00468,"provenance":"source"},"cwes":[{"id":"CWE-706","name":"Use of Incorrectly-Resolved Name or Reference"}],"references":[{"url":"https://github.com/google/zx/issues/1348","tags":[]}],"priority":{"score":4.0,"factors":[{"name":"EPSS percentile","points":0.09},{"name":"CVSS severity","points":3.92}]},"vendorSlug":"google","affectedVersions":[{"vendor":"Google","product":"zx","versions":["8.8.4"]}],"capec":[{"id":"CAPEC-212","name":"Functionality Misuse"}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-11-20T16:49:00.710619Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"zx","vulnerableRanges":["<8.8.5"],"patched":["8.8.5"],"from":["GHSA-w87r-vg9q-crqm"],"provenance":"source"}],"summary":{"text":"Google's zx has a logic flaw in its CLI (src/cli.ts) where the handling of the --prefer-local=<path> option causes the cleanup routine to remove the symlink target instead of the symlink itself. An attacker with local access who can get zx invoked with --prefer-local pointing at a path can cause it to delete an external node_modules directory outside the current working directory, and this requires local access, no privileges, and a user to act on the attacker's prompt or configuration.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:21:38Z"},"euvd":{"id":"EUVD-2025-198297","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-24959","published":"2025-02-03","fixed":"8.3.2","kev":false,"link":{"from":"CVE-2025-24959","to":"CVE-2025-13437","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:zx","fromFixed":"8.3.2","toFixed":"8.8.5","daysApart":290}]}},{"cve":"CVE-2025-13437","published":"2025-11-20","fixed":"8.8.5","kev":false}],"package":"npm:zx"}}