Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-71476

Nx: Zip-Slip in the self-hosted remote cache
Back to all
CVE

CVE-2026-71476

Nx: Zip-Slip in the self-hosted remote cache

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 (NXSELFHOSTEDREMOTECACHE_SERVER@nx/s3-cache, etc.) are affected.

Two self-hosted cache surfaces are affected:

  1. The built-in HTTP remote cache (NXSELFHOSTEDREMOTECACHE_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:

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

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
8.7
-
4.0
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
C
H
U
0
-
C
H
U
9.8
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Related Resources

No items found.

References

https://github.com/nrwl/nx/security/advisories/GHSA-vp3h-ghgh-jr7g, https://github.com/nrwl/nx/pull/36116, https://github.com/nrwl/nx/commit/2b20c2da39d263c32ae05767577589481a309fee, https://github.com/nrwl/nx/commit/a82807621e4176e37909d2c1afede661b45cc30, https://github.com/nrwl/nx/commit/ad296578fe980a4aad66f8af0add21f6ddf907d9, https://github.com/nrwl/nx

Severity

9.8

CVSS Score
0
10

Basic Information

Base CVSS
9.8
EPSS Probability
0.00582%
EPSS Percentile
0.4556%
Introduced Version
0,20.8.0,22.7.0-beta.5,23.0.0-beta.0,23.1.0-beta.0,23.0.0-canary.20260424-608c3be,22.7.0-pr.33655.d8f5d50,22.7.0-beta.2,22.7.0-canary.20260322-79bbe1b,22.7.0-pr.33655.9c47453,20.8.0-beta.0,20.8.0-canary.20250412-07ad2d7,0.0.0-pr-30457-d91a68c
Fix Available
22.7.7,23.0.2,23.1.0-beta.5,23.1.0-canary.20260630-d5821e2,23.1.0-pr.36127.5a31f69

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading