Summary
Nx: Zip-Slip in the self-hosted remote cache
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.
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
Impact
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Upgrade to Nx 22.7.7 or 23.0.2 (or later). The patched extractor is a drop-in, no configuration change is required.
Frequently Asked Questions
- What is CVE-2026-71476? CVE-2026-71476 is a high-severity path traversal vulnerability in nx (npm), affecting versions >= 20.8.0, < 22.7.7. It is fixed in 22.7.7, 23.0.2. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
- Which packages are affected by CVE-2026-71476?
nx(npm) (versions >= 20.8.0, < 22.7.7)@nx/s3-cache(npm) (versions <= 5.0.7)@nx/gcs-cache(npm) (versions <= 5.0.7)@nx/azure-cache(npm) (versions <= 5.0.7)@nx/shared-fs-cache(npm) (versions <= 5.0.7)@nx/powerpack-s3-cache(npm) (versions <= 5.0.7)@nx/powerpack-gcs-cache(npm) (versions <= 5.0.7)@nx/powerpack-azure-cache(npm) (versions <= 5.0.7)@nx/powerpack-shared-fs-cache(npm) (versions <= 5.0.7)
- Is there a fix for CVE-2026-71476? Yes. CVE-2026-71476 is fixed in 22.7.7, 23.0.2. Upgrade to this version or later.
- Is CVE-2026-71476 exploitable, and should I be worried? Whether CVE-2026-71476 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-71476 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-71476?
- Upgrade
nxto 22.7.7 or later - Upgrade
nxto 23.0.2 or later
- Upgrade