Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAttacker gains MITM position or compromises cache server
-
DeliveryDeveloper or CI runner executes Nx build task
-
ExploitNx requests cache artifact from self-hosted HTTP remote cache
-
InstallAttacker returns crafted tar archive with path-traversal entries
-
C2Unguarded Entry::unpack() writes files to arbitrary filesystem paths
-
ExecuteAttacker-controlled file overwrites sensitive location (crontab, SSH keys, startup script)
-
ImpactCode 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – 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)
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
Affected Packages
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
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
AC:H reflects the MITM or cache-server-compromise prerequisite; UI:R captures the developer triggering cache retrieval; PR:N for the attacker side.
Primary rating from Vendor (https://github.com/nrwl/nx).
CVSS VectorVendor: https://github.com/nrwl/nx
Lifecycle Timeline
3DescriptionCVE.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:
- The built-in HTTP remote cache (
NX_SELF_HOSTED_REMOTE_CACHE_SERVER, innx) - fixed in the patched release. - 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:
// 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
Blast Radius
ecosystem impact- 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.
Executive ViewAI
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.
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
EUVD-2026-54250
GHSA-vp3h-ghgh-jr7g
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB