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
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attacker gains MITM position or compromises cache server
  2. Delivery
    Developer or CI runner executes Nx build task
  3. Exploit
    Nx requests cache artifact from self-hosted HTTP remote cache
  4. Install
    Attacker returns crafted tar archive with path-traversal entries
  5. C2
    Unguarded Entry::unpack() writes files to arbitrary filesystem paths
  6. Execute
    Attacker-controlled file overwrites sensitive location (crontab, SSH keys, startup script)
  7. Impact
    Code execution achieved on developer or CI machine

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the Nx workspace is configured to use a self-hosted HTTP remote cache, enabled via the NX_SELF_HOSTED_REMOTE_CACHE_SERVER environment variable or one of the deprecated self-hosted cache packages (@nx/s3-cache, @nx/gcs-cache, @nx/azure-cache, @nx/shared-fs-cache). The vulnerability is NOT present in the default local cache or Nx Cloud configurations. The attacker must be positioned to intercept or control the HTTP response from the self-hosted cache server - either via a MITM position on the network (e.g., compromised network path in CI infrastructure) or by having compromised or fully controlling the cache server itself. A developer or CI process must actively run an Nx task (nx build, nx test, etc.) that triggers a remote cache artifact retrieval (UI:P in CVSS 4.0 - passive user interaction). The vulnerability was introduced in Nx 20.8.0; versions prior to 20.8.0 are not affected by this specific extractor flaw. Exploitation is limited to workspaces where a self-hosted cache backend is actively in use and reachable by the attacker.

Impact

The CVSS 4.0 base score of 8.7 (AV:N/AC:L/AT:N/PR:N/UI:P) reflects the high confidentiality, integrity, and availability impact to the vulnerable system. The UI:P metric captures that exploitation requires a developer to actively run an Nx task that triggers cache retrieval - a routine CI or local build action, making this passive interaction in practice. The attack requires either a MITM position on the network path to the self-hosted cache server, or direct compromise/control of the cache server itself; this is a meaningful prerequisite that narrows the realistic attacker population compared to a fully unauthenticated remote attack. No EPSS data was provided and this CVE is absent from CISA KEV, indicating no confirmed widespread exploitation. However, the exploit primitive (crafted tar archive served by a controlled server) is mechanically straightforward once the prerequisite is met. CI/CD pipelines connecting to shared or cloud-hosted self-hosted cache servers present heightened risk because a compromised cache server could target all pipeline runners simultaneously. The deprecated package surface (@nx/s3-cache etc.) receives no patch, leaving teams using those packages persistently exposed until they migrate.

Exploit ScenarioDerived

An attacker with a MITM position between a CI runner and the self-hosted Nx remote cache server intercepts a cache artifact retrieval request and substitutes a crafted gzipped tar archive containing entries with path-traversal filenames such as '../../.ssh/authorized_keys' or '/etc/cron.d/backdoor'. When the CI runner's nx process extracts the archive using the unguarded Entry::unpack() call, these files are written to arbitrary locations on the filesystem with the privileges of the build process. The attacker then achieves code execution on the next cron tick or SSH session. No public exploit code has been identified at time of analysis, but the exploit primitive requires only crafting a malicious tar archive - a well-understood technique.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Aug 06, 2026

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.

Earlier versions of this analysis (1)
v1 Aug 06, 2026 - 20:37

Arbitrary file write escalating to remote code execution in Nx's self-hosted HTTP remote cache affects versions 20.8.0 through 22.7.6, exploitable by a malicious or on-path (MITM) cache server. The Rust-based native cache extractor joins attacker-controlled tar entry names directly onto the output path without containment validation, enabling classic Zip-Slip (CWE-22) path traversal that writes files to arbitrary locations on the machine running Nx. Only workspaces explicitly configured to use a self-hosted remote cache are at risk - Nx Cloud and the default local cache are confirmed unaffected. No public exploit has been identified at time of analysis, and the vulnerability is not listed in CISA KEV.

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.

Affected VersionsENISA

NX 20.8.0, < 22.7.7
NX 23.0.0, < 23.0.2

Affected Packages

npm @nx/azure-cache no fix
npm @nx/gcs-cache no fix
npm @nx/powerpack-azure-cache no fix
npm @nx/powerpack-gcs-cache no fix
npm @nx/powerpack-s3-cache no fix
npm @nx/powerpack-shared-fs-cache no fix
npm @nx/s3-cache no fix
npm @nx/shared-fs-cache no fix
npm nx fix: 22.7.7, 23.0.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 9 packages in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

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.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

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
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

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

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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Analysis Updated
Aug 06, 2026 - 22:36 vuln.today
v2 - CVSS changed
CVSS changed
Aug 06, 2026 - 22:22 NVD
8.7 (HIGH)
CVE Published
Aug 06, 2026 - 20:10 cve.org
HIGH

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

Executive ViewAI

Why It Matters

Nx's self-hosted remote caching configuration (versions 20.8.0-22.7.6) can be leveraged by a compromised or intercepted cache server to execute arbitrary code on developer machines. No public exploit identified at time of analysis. This exposes development teams using @nx/s3-cache, @nx/gcs-cache, @nx/azure-cache, @nx/shared-fs-cache, or NX_SELF_HOSTED_REMOTE_CACHE_SERVER to supply chain compromise and intellectual property theft.

Business Impact: High
Compensating Controls

Apply vendor patch (Nx >= 22.7.7). Pending patch deployment, restrict cache server network access via firewall rules and rotate authentication credentials.

Threat Intelligence Overview

EPSS Score
0.6%
Top 55% exploitable
Prevalence
Medium
popular monorepo build tool, but only self-hosted cache deployments exposed
Threat Intel
1
1 source
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Total

Priority Score

45
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Vendor StatusVendor

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