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.
Published: 2025-11-20
Score: 5.6 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Analysis and contextual insights are available on OpenCVE Cloud.

Remediation

No vendor fix or workaround currently provided.

Additional remediation guidance may be available on OpenCVE Cloud.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-w87r-vg9q-crqm zx Uses Incorrectly-Resolved Name or Reference
History

Mon, 24 Nov 2025 09:15:00 +0000

Type Values Removed Values Added
First Time appeared Google
Google zx
Vendors & Products Google
Google zx

Fri, 21 Nov 2025 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L'}

threat_severity

Moderate


Thu, 20 Nov 2025 17:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 20 Nov 2025 16:30:00 +0000

Type Values Removed Values Added
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.
Title Arbitrary node_modules Directory Deletion in Google zx
Weaknesses CWE-706
References
Metrics cvssV4_0

{'score': 5.6, '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: Google

Published:

Updated: 2025-11-20T16:49:32.470Z

Reserved: 2025-11-19T19:03:28.234Z

Link: CVE-2025-13437

cve-icon Vulnrichment

Updated: 2025-11-20T16:49:26.587Z

cve-icon NVD

Status : Deferred

Published: 2025-11-20T17:15:49.453

Modified: 2026-04-15T00:35:42.020

Link: CVE-2025-13437

cve-icon Redhat

Severity : Moderate

Publid Date: 2025-11-20T16:25:16Z

Links: CVE-2025-13437 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2025-11-24T09:09:35Z

Weaknesses