Skip to main content

Nx Build Tool CVE-2026-71476

| EUVDEUVD-2026-54250 HIGH
Path Traversal (CWE-22)
2026-08-06 https://github.com/nrwl/nx GHSA-vp3h-ghgh-jr7g
8.7
CVSS 4.0 · Vendor: https://github.com/nrwl/nx
Share

Severity by source

Vendor (https://github.com/nrwl/nx) PRIMARY
8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
7.5 HIGH

AC:H reflects the MITM or cache-server-compromise prerequisite; UI:R captures the developer triggering cache retrieval; PR:N for the attacker side.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Red Hat
9.6 CRITICAL
qualitative

Primary rating from Vendor (https://github.com/nrwl/nx).

CVSS VectorVendor: https://github.com/nrwl/nx

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
P
Scope
X

Lifecycle Timeline

6
Analysis Updated
Aug 06, 2026 - 22:36 vuln.today
v2 (cvss_changed)
Re-analysis Queued
Aug 06, 2026 - 22:22 vuln.today
cvss_changed
CVSS changed
Aug 06, 2026 - 22:22 NVD
8.7 (HIGH)
Source Code Evidence Fetched
Aug 06, 2026 - 20:37 vuln.today
Analysis Generated
Aug 06, 2026 - 20:37 vuln.today
CVE Published
Aug 06, 2026 - 20:10 cve.org
HIGH

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1 npm packages depend on @nx/azure-cache (1 direct, 0 indirect)
  • 1 npm packages depend on @nx/gcs-cache (1 direct, 0 indirect)
  • 1 npm packages depend on @nx/s3-cache (1 direct, 0 indirect)
  • 1 npm packages depend on @nx/shared-fs-cache (1 direct, 0 indirect)
  • 41 npm packages depend on nx (6 direct, 37 indirect)

Ecosystem-wide dependent count for version 5.0.7 and other introduced versions.

DescriptionCVE.org

Summary

The Nx self-hosted HTTP remote cache extracts downloaded cache artifacts without constraining where files are written. A malicious - or on-path (MITM) - remote cache server can return a crafted tar archive whose entries escape the cache directory and write to arbitrary locations on the machine running Nx. This arbitrary file write can be escalated to remote code execution. The directly exploitable issue is the self-hosted HTTP remote cache.

Affected Packages

> [!IMPORTANT] > Nx's default local cache and Nx Cloud are NOT affected. The default local cache and Nx Cloud use separate cache retrieval and extraction mechanisms that does not have this vulnerability. Only workspaces that use a self-hosted remote cache (NX_SELF_HOSTED_REMOTE_CACHE_SERVER, @nx/s3-cache, etc.) are affected.

Two self-hosted cache surfaces are affected:

  1. The built-in HTTP remote cache (NX_SELF_HOSTED_REMOTE_CACHE_SERVER, in nx) - fixed in the patched release.
  2. The self-hosted cache packages - @nx/s3-cache, @nx/gcs-cache, @nx/azure-cache, @nx/shared-fs-cache (and their @nx/powerpack-* predecessors) - the same flaw in their own extractor. Deprecated (CVE-2025-36852) and not patched; migrate off (see Remediation).

The shared step that copies cached outputs into the workspace was also part of the exposure and is hardened in the patched nx release.

Remediation

Upgrade to Nx 22.7.7 or 23.0.2 (or later). The patched extractor is a drop-in - no configuration change is required.

If you use the S3, GCS, Azure, or shared-filesystem cache packages

@nx/s3-cache, @nx/gcs-cache, @nx/azure-cache, and @nx/shared-fs-cache (and their @nx/powerpack-* predecessors) are separately versioned packages and are already deprecated (see CVE-2025-36852). Upgrading nx hardens the shared restore step, but it does not fully secure these packages. The remediation for them is to migrate off - to Nx Cloud or the self-hosted OpenAPI/HTTP remote cache - per the deprecation guidance: https://nx.dev/docs/reference/deprecated/self-hosted-cache-packages

Details

When Nx retrieves an artifact from the self-hosted HTTP remote cache, it downloads a gzipped tar archive and extracts it. The extractor joined each untrusted tar entry name directly onto the output directory and unpacked it with tar's unguarded Entry::unpack(), which performs no containment check:

rust
// vulnerable
let path_on_disk = output_dir.join(entry_path); // entry_path is attacker-controlled
fs::create_dir_all(path_on_disk.parent()…)?;
entry.unpack(&path_on_disk)?;

In addition, restore now copies only the declared task outputs (never the whole cache directory), confined to the workspace root; parent directories are realized as real directories so a write can never traverse a symlink; declared outputs that resolve outside the workspace are rejected; and the malformed-input cases return errors instead of panicking.

References

  • Fix: https://github.com/nrwl/nx/pull/36116 (merged)
  • TLS-verification warning follow-up: https://github.com/nrwl/nx/pull/36132 (merged)
  • Vulnerable extractor introduced in Nx 20.8.0: https://github.com/nrwl/nx/pull/30593

Credits

  • Lidor B., Novee Security - Reporter
  • Assaf Levkovich, Novee Security - Reporter

AnalysisAI

Arbitrary file write via Zip-Slip in Nx's self-hosted HTTP remote cache extractor allows a malicious or MITM-positioned cache server to overwrite files anywhere on the developer's machine, escalating to remote code execution. Affected are Nx workspaces using self-hosted remote cache (NX_SELF_HOSTED_REMOTE_CACHE_SERVER, @nx/s3-cache, @nx/gcs-cache, @nx/azure-cache, @nx/shared-fs-cache) running nx >= 20.8.0 and < 22.7.7; Nx Cloud and the default local cache are confirmed unaffected. No public exploit code has been identified and this vulnerability is not listed in CISA KEV at time of analysis, but the CVSS 4.0 score of 8.7 and trivial exploitability once positioned reflect significant real-world risk for teams using self-hosted caching.

Technical ContextAI

Nx is a popular monorepo build orchestration tool (npm package 'nx') that optionally supports remote caching to share build artifacts across CI and developer machines. The vulnerable code path, introduced in Nx 20.8.0 (PR #30593), is a Rust-based tar extractor inside the native module. The extractor called Rust's tar crate Entry::unpack() with a path computed as output_dir.join(entry_path) where entry_path is the attacker-controlled filename from the archive - a textbook Zip-Slip (CWE-22: Path Traversal). No containment check was applied to prevent entries with '../../../' sequences or absolute paths from writing outside the intended cache directory. The fix in PR #36116 adds a normalize_outputs() function that validates and relativizes all output paths before extraction, rejects paths resolving outside the workspace root, and replaces the blanket directory copy with a scoped copy_outputs_into_workspace() that only restores declared task outputs. The self-hosted cache packages (@nx/s3-cache, @nx/gcs-cache, @nx/azure-cache, @nx/shared-fs-cache and powerpack predecessors) share the same flawed extractor and are deprecated (see CVE-2025-36852) with no patch planned.

RemediationAI

Upgrade nx to version 22.7.7 or 23.0.2 (or later); the patched extractor is a drop-in replacement requiring no configuration changes, as confirmed by the vendor advisory at https://github.com/nrwl/nx/security/advisories/GHSA-vp3h-ghgh-jr7g. The fix is delivered via merged PR #36116 and associated commits (2b20c2da, a8280762, ad296578). For workspaces using @nx/s3-cache, @nx/gcs-cache, @nx/azure-cache, @nx/shared-fs-cache, or their @nx/powerpack-* predecessors: no patch will be issued; the required remediation is migration off these deprecated packages to Nx Cloud or the self-hosted OpenAPI/HTTP remote cache per the deprecation guide at https://nx.dev/docs/reference/deprecated/self-hosted-cache-packages. Upgrading nx does harden the shared restore step even when deprecated packages are present, but does not fully close the vulnerability in those packages' own extractors. As an interim measure for teams unable to migrate immediately, restricting network access to the self-hosted cache server (firewall rules, VPN-only access) reduces MITM exposure; however, it does not protect against a server-side compromise of the cache server itself.

Vendor StatusVendor

Share

CVE-2026-71476 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy