CVE-2026-71476: Path Traversal

Published Aug 6, 2026
·
Updated

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

Two self-hosted cache surfaces are affected:

1. The built-in HTTP remote cache (NXSELFHOSTEDREMOTECACHESERVER, 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 pathondisk = outputdir.join(entrypath); // entrypath is attacker-controlled fs::createdirall(pathondisk.parent()…)?; entry.unpack(&pathondisk)?;

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

Affected Software

10 affected componentsFixes available
npm/nx>=23.0.0<23.0.2
23.0.2
npm/@nx/powerpack-shared-fs-cache<=5.0.7
npm/@nx/powerpack-azure-cache<=5.0.7
npm/@nx/powerpack-gcs-cache<=5.0.7
npm/@nx/powerpack-s3-cache<=5.0.7
npm/@nx/shared-fs-cache<=5.0.7
npm/@nx/azure-cache<=5.0.7
npm/@nx/gcs-cache<=5.0.7
npm/@nx/s3-cache<=5.0.7
npm/nx>=20.8.0<22.7.7
22.7.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/nx to a version that resolves this vulnerability.

    Fixed in 23.0.2
  2. Upgrade

    Upgrade npm/nx to a version that resolves this vulnerability.

    Fixed in 22.7.7
  3. Upgrade

    Upgrade nx to a version that resolves this vulnerability.

    Fixed in 22.7.7
  4. Upgrade

    Upgrade nx to a version that resolves this vulnerability.

    Fixed in 23.0.2
  5. Upgrade

    Upgrade @nx/s3-cache to a version that resolves this vulnerability.

    Fixed in 22.7.7
  6. Upgrade

    Upgrade @nx/gcs-cache to a version that resolves this vulnerability.

    Fixed in 22.7.7
  7. Upgrade

    Upgrade @nx/azure-cache to a version that resolves this vulnerability.

    Fixed in 22.7.7
  8. Upgrade

    Upgrade @nx/shared-fs-cache to a version that resolves this vulnerability.

    Fixed in 22.7.7
  9. Compensating control

    Migrate off the self-hosted remote cache surfaces: Nx self-hosted HTTP remote cache (NX_SELF_HOSTED_REMOTE_CACHE_SERVER) and the self-hosted cache packages (@nx/s3-cache, @nx/gcs-cache, @nx/azure-cache, @nx/shared-fs-cache and @nx/powerpack-* predecessors) to Nx Cloud or the self-hosted OpenAPI/HTTP remote cache, per the deprecation guidance.

Event History

Aug 6, 2026
Advisory Published
via GitHub·08:10 PM
Data Sourced
via GitHub·08:10 PM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203