CVE-2025-13437

Arbitrary node_modules Directory Deletion in Google zx

MEDIUM
5.6
CVSS Score
Published: November 20, 2025 at 04:25 PM UTC
Updated: October 18, 2026 at 08:10 PM UTC
1 product affected across 1 vendorZx

Using zx by Google?

Get instant alerts when new vulnerabilities affect zx - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.6
Exploit prediction
EPSS 0.1%
SSVC
PoC

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

References (1)

SSVC — Action Prioritization

SSVCPoCNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.6MEDIUMGoogle
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-706

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card