{"id":"CVE-2026-71476","aliases":["EUVD-2026-54250","GHSA-vp3h-ghgh-jr7g","ROOT-APP-NPM-CVE-2026-71476"],"status":"published","title":"Nx: Zip-Slip in the self-hosted remote cache","description":"Nx is a monorepo solution for TypeScript and polyglot codebases. From version 20.8.0 until 22.7.7 and 23.0.2, 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, which can be escalated to remote code execution. Nx's default local cache and Nx Cloud are not affected; only workspaces configured to use a self-hosted remote cache are affected. This issue is fixed in versions 22.7.7 and 23.0.2.","severity":{"version":"4.0","score":8.7,"vector":"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","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00865,"percentile":0.58907,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-22","CWE-59"],"published":"2026-08-06T20:07:09Z","modified":"2026-10-28T02:30:25Z","fixes":[{"ecosystem":"npm","package":"nx","fixed_in":["22.7.7","23.0.2"],"sources":["ghsa","osv"]},{"ecosystem":"Root:npm","package":"nx","fixed_in":["23.0.0-aikido.1","21.6.11-aikido.1","21.6.10-aikido.1"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/nx","fixed_in":["23.0.0-root.io.1","21.6.11-root.io.1","21.6.10-root.io.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"nx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"20.8.0"},{"fixed":"22.7.7"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@nx/s3-cache","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"5.0.7"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@nx/gcs-cache","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"5.0.7"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@nx/azure-cache","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"5.0.7"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@nx/shared-fs-cache","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"5.0.7"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@nx/powerpack-s3-cache","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"5.0.7"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@nx/powerpack-gcs-cache","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"5.0.7"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@nx/powerpack-azure-cache","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"5.0.7"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@nx/powerpack-shared-fs-cache","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"5.0.7"}]}]},{"source":"ghsa","ecosystem":"npm","package":"nx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"23.0.0"},{"fixed":"23.0.2"}]}]},{"source":"osv","ecosystem":"npm","package":"nx","ranges":[{"type":"SEMVER","events":[{"introduced":"20.8.0"},{"fixed":"22.7.7"}]}]},{"source":"osv","ecosystem":"npm","package":"@nx/s3-cache","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"5.0.7"}]}]},{"source":"osv","ecosystem":"npm","package":"@nx/gcs-cache","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"5.0.7"}]}]},{"source":"osv","ecosystem":"npm","package":"@nx/azure-cache","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"5.0.7"}]}]},{"source":"osv","ecosystem":"npm","package":"@nx/shared-fs-cache","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"5.0.7"}]}]},{"source":"osv","ecosystem":"npm","package":"@nx/powerpack-s3-cache","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"5.0.7"}]}]},{"source":"osv","ecosystem":"npm","package":"@nx/powerpack-gcs-cache","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"5.0.7"}]}]},{"source":"osv","ecosystem":"npm","package":"@nx/powerpack-azure-cache","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"5.0.7"}]}]},{"source":"osv","ecosystem":"npm","package":"@nx/powerpack-shared-fs-cache","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"5.0.7"}]}]},{"source":"osv","ecosystem":"npm","package":"nx","ranges":[{"type":"SEMVER","events":[{"introduced":"23.0.0"},{"fixed":"23.0.2"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"nx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"23.0.0-aikido.1"},{"fixed":"21.6.11-aikido.1"},{"fixed":"21.6.10-aikido.1"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/nx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"23.0.0-root.io.1"},{"fixed":"21.6.11-root.io.1"},{"fixed":"21.6.10-root.io.1"}]}]}],"products":[{"vendor":"nrwl","product":"nx"},{"vendor":"siemens","product":"nx"}],"references":[{"url":"https://github.com/nrwl/nx/security/advisories/GHSA-vp3h-ghgh-jr7g","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/nrwl/nx/pull/36116","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/nrwl/nx/commit/2b20c2da39d263c32ae05767577589481a309fee","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/nrwl/nx/commit/a82807621e4176e37909d2c1afede661b45cc30","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/nrwl/nx/commit/ad296578fe980a4aad66f8af0add21f6ddf907d9","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/advisories/GHSA-vp3h-ghgh-jr7g"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/71xxx/CVE-2026-71476.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-71476","tags":["advisory"]},{"url":"https://github.com/nrwl/nx","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-71476","title":"Nx: Zip-Slip in the self-hosted remote cache","description":"Nx is a monorepo solution for TypeScript and polyglot codebases. From version 20.8.0 until 22.7.7 and 23.0.2, 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, which can be escalated to remote code execution. Nx's default local cache and Nx Cloud are not affected; only workspaces configured to use a self-hosted remote cache are affected. This issue is fixed in versions 22.7.7 and 23.0.2.","status":"published","published":"2026-08-06T20:07:09.019Z","modified":"2026-08-08T02:33:11.207Z","cvss":[{"version":"4.0","score":8.7,"vector":"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","level":"high","assessor":"cna"}],"cwes":["CWE-22","CWE-59"],"updated_at":"2026-11-02T14:19:49.199185Z"}],"euvd":[{"id":"EUVD-2026-54250","description":"Nx is a monorepo solution for TypeScript and polyglot codebases. From version 20.8.0 until 22.7.7 and 23.0.2, 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, which can be escalated to remote code execution. Nx's default local cache and Nx Cloud are not affected; only workspaces configured to use a self-hosted remote cache are affected. This issue is fixed in versions 22.7.7 and 23.0.2.","status":"published","published":"2026-08-06T20:07:09Z","modified":"2026-08-08T02:33:11Z","cvss":[{"version":"4.0","score":8.7,"vector":"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","level":"high"}],"updated_at":"2026-11-02T18:02:06.573967Z"}],"ghsa":[{"id":"GHSA-vp3h-ghgh-jr7g","title":"Nx: Zip-Slip in the self-hosted remote cache","description":"## Summary\n\nThe 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.\n\n## Affected Packages\n\n\u003e [!IMPORTANT]\n\u003e **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.\n\nTwo self-hosted cache surfaces are affected:\n\n1. **The built-in HTTP remote cache** (`NX_SELF_HOSTED_REMOTE_CACHE_SERVER`, in `nx`) — **fixed** in the patched release.\n2. **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).\n\nThe shared step that copies cached outputs into the workspace was also part of the exposure and is hardened in the patched `nx` release.\n\n## Remediation\n\n**Upgrade to Nx `22.7.7` or `23.0.2` (or later).** The patched extractor is a drop-in — no configuration change is required.\n\n### If you use the S3, GCS, Azure, or shared-filesystem cache packages\n\n`@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\n\n## Details\n\nWhen 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:\n\n```rust\n// vulnerable\nlet path_on_disk = output_dir.join(entry_path); // entry_path is attacker-controlled\nfs::create_dir_all(path_on_disk.parent()…)?;\nentry.unpack(\u0026path_on_disk)?;\n```\n\nIn 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.\n\n## References\n\n- Fix: https://github.com/nrwl/nx/pull/36116 (merged)\n- TLS-verification warning follow-up: https://github.com/nrwl/nx/pull/36132 (merged)\n- Vulnerable extractor introduced in Nx 20.8.0: https://github.com/nrwl/nx/pull/30593\n\n## Credits\n\n- **Lidor B.**, Novee Security — Reporter\n- **Assaf Levkovich**, Novee Security — Reporter","status":"published","published":"2026-08-06T20:10:03Z","modified":"2026-08-06T20:10:04Z","cvss":[{"version":"4.0","score":8.7,"vector":"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","level":"high"}],"cwes":["CWE-22","CWE-59"],"updated_at":"2026-11-02T14:40:57.999375Z"}],"nvd":[{"id":"CVE-2026-71476","description":"Nx is a monorepo solution for TypeScript and polyglot codebases. From version 20.8.0 until 22.7.7 and 23.0.2, 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, which can be escalated to remote code execution. Nx's default local cache and Nx Cloud are not affected; only workspaces configured to use a self-hosted remote cache are affected. This issue is fixed in versions 22.7.7 and 23.0.2.","status":"published","published":"2026-08-06T22:18:31.603Z","modified":"2026-10-24T15:10:00.19Z","cvss":[{"version":"4.0","score":8.7,"vector":"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","level":"high","assessor":"secondary"}],"cwes":["CWE-22","CWE-59"],"updated_at":"2026-11-02T14:12:35.386166Z"}],"osv":[{"id":"CVE-2026-71476","title":"Nx: Zip-Slip in the self-hosted remote cache","description":"Nx is a monorepo solution for TypeScript and polyglot codebases. From version 20.8.0 until 22.7.7 and 23.0.2, 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, which can be escalated to remote code execution. Nx's default local cache and Nx Cloud are not affected; only workspaces configured to use a self-hosted remote cache are affected. This issue is fixed in versions 22.7.7 and 23.0.2.","status":"published","published":"2026-08-06T20:07:09.019Z","modified":"2026-10-28T02:30:25.253261613Z","cvss":[{"version":"4.0","score":8.7,"vector":"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","level":"high"}],"cwes":["CWE-22","CWE-59"],"updated_at":"2026-11-02T15:45:15.164658Z"},{"id":"GHSA-vp3h-ghgh-jr7g","title":"Nx: Zip-Slip in the self-hosted remote cache","description":"## Summary\n\nThe 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.\n\n## Affected Packages\n\n\u003e [!IMPORTANT]\n\u003e **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.\n\nTwo self-hosted cache surfaces are affected:\n\n1. **The built-in HTTP remote cache** (`NX_SELF_HOSTED_REMOTE_CACHE_SERVER`, in `nx`) — **fixed** in the patched release.\n2. **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).\n\nThe shared step that copies cached outputs into the workspace was also part of the exposure and is hardened in the patched `nx` release.\n\n## Remediation\n\n**Upgrade to Nx `22.7.7` or `23.0.2` (or later).** The patched extractor is a drop-in — no configuration change is required.\n\n### If you use the S3, GCS, Azure, or shared-filesystem cache packages\n\n`@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\n\n## Details\n\nWhen 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:\n\n```rust\n// vulnerable\nlet path_on_disk = output_dir.join(entry_path); // entry_path is attacker-controlled\nfs::create_dir_all(path_on_disk.parent()…)?;\nentry.unpack(\u0026path_on_disk)?;\n```\n\nIn 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.\n\n## References\n\n- Fix: https://github.com/nrwl/nx/pull/36116 (merged)\n- TLS-verification warning follow-up: https://github.com/nrwl/nx/pull/36132 (merged)\n- Vulnerable extractor introduced in Nx 20.8.0: https://github.com/nrwl/nx/pull/30593\n\n## Credits\n\n- **Lidor B.**, Novee Security — Reporter\n- **Assaf Levkovich**, Novee Security — Reporter","status":"published","published":"2026-08-06T20:10:03Z","modified":"2026-08-06T20:25:59.560723Z","cvss":[{"version":"4.0","score":8.7,"vector":"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","level":"high"}],"cwes":["CWE-22","CWE-59"],"updated_at":"2026-11-02T15:46:57.348035Z"},{"id":"ROOT-APP-NPM-CVE-2026-71476","title":"CVE-2026-71476 in nx - Patched by Root","description":"Root has patched CVE-2026-71476 in the nx package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-08-17T13:30:05Z","modified":"2026-08-17T15:15:03.419105575Z","updated_at":"2026-11-02T15:53:27.649662Z"}]}}
