Skip to content

chore(deps): Update dependency nx to v22 [SECURITY] - #410

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-nx-vulnerability
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-nx-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
nx (source) 21.3.2 β†’ 22.7.7 age confidence

nx graph dev server permissive CORS policy

CVE-2026-54753 / GHSA-g2r8-wvmj-jf5w

More information

Details

Summary

The local HTTP server started by nx graph sent Access-Control-Allow-Origin: * on every response, letting any website a developer visited read the server's responses cross-origin β€” including the full project graph and the output of the /help endpoint, which runs a target's configured help command. The practical impact is typically cross-origin information disclosure, but can be arbitrary command injection in rare cases.

Severity

Exploitation requires the developer to be running nx graph and to visit an attacker page. Any execution beyond benign help commands also requires a malicious target to already be present in the workspace (see Details).

Affected & Patched Versions

Package: nx (npm).

  • Affected: >= 17.0.4, < 22.7.2 and >= 23.0.0-beta.0, < 23.0.0-beta.2
  • Patched: 22.7.2+ (backport) and 23.0.0 (first in 23.0.0-beta.2)

The wildcard CORS header was introduced in 17.0.4; the /help execution endpoint in 19.4.0. The 21.x line is not patched β€” 21.x users should upgrade to 22.7.2 or later.

Details

nx graph starts a local server (default http://127.0.0.1:4211). Before the fix, its request handler set a wildcard CORS header on every response:

res.setHeader('Access-Control-Allow-Origin', '*');

The /help endpoint runs a target's configured command:

const command = target.metadata?.help?.command;
return execSync(command, { cwd: target.options?.cwd ?? workspaceRoot }).toString();

A GET /help is a CORS "simple request", so a malicious page could fetch() it with no preflight, and the wildcard header let the page read the result. This exposes the project graph (project names, file paths, dependencies, build configuration) and the output of any configured help command.

The command is not attacker-controlled through the request β€” it comes from the workspace's project configuration, and first-party plugins (jest, vite, cypress) populate it with benign, read-only help commands. For /help to run anything malicious, a target carrying a malicious help.command must already exist in the project graph, which can only be introduced by installing a malicious package or by altering the workspace's own code/configuration β€” both of which already grant code execution independent of this flaw.

The fix (#​35494) removes the header; the browser's same-origin policy then blocks cross-origin reads.

References
Credits

Thanks to Nozomu Sasaki (Paul) (@​morimori-dev) for finding and responsibly reporting this issue.

Severity

  • CVSS Score: 5.9 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


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

CVE-2026-71476 / GHSA-vp3h-ghgh-jr7g

More information

Details

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:

  1. The built-in HTTP remote cache (NX_SELF_HOSTED_REMOTE_CACHE_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
Credits
  • Lidor B., Novee Security β€” Reporter
  • Assaf Levkovich, Novee Security β€” Reporter

Severity

  • CVSS Score: 8.7 / 10 (High)
  • Vector String: 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

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

nrwl/nx (nx)

v22.7.7

Compare Source

22.7.7 (2026-07-10)
🩹 Fixes
  • core: prevent path traversal / zip-slip in self-hosted remote cache (#​36116)
  • core: warn when the self-hosted remote cache disables TLS verification (NXC-4593) (#​36132, #​36116)
  • dotnet: declare obj as a publish output to fix sandbox violation (#​35858)
  • dotnet: declare directory build props input for analyzer dotnet tasks (df7540195a)
  • dotnet: declare directory build props on the separate release build target (6545ee2222)
  • dotnet: declare directory build props on the analyzer tests dotnet targets (e72ee0dd79)
❀️ Thank You

v22.7.6

Compare Source

22.7.6 (2026-06-23)
🩹 Fixes
  • misc: bump happy-dom, tmp, and form-data to patched versions (#​36013)
❀️ Thank You

v22.7.5

Compare Source

22.7.5 (2026-05-27)
🩹 Fixes
❀️ Thank You

v22.7.4

Compare Source

22.7.4 (2026-05-25)
🩹 Fixes
❀️ Thank You

v22.7.3

Compare Source

22.7.3 (2026-05-22)

πŸš€ Features
🩹 Fixes
❀️ Thank You

v22.7.2

Compare Source

22.7.2 (2026-05-14)

πŸš€ Features
  • gradle: stream batch task results to nx as they finish (#​35487)
  • nx-dev: track docs analytics for code copy, LLM prompt, YouTube (#​35526)
  • testing: add migration for Jest 30 snapshot guide link (#​35629)
🩹 Fixes
❀️ Thank You

v22.7.1

Compare Source

22.7.1 (2026-04-28)
🩹 Fixes
❀️ Thank You

v22.7.0

Compare Source

22.7.0 (2026-04-24)
πŸš€ Features
  • core: add .nx/self-healing to .gitignore (#​34855)
  • core: decouple DB version from Nx version and share DB across worktrees (#​34942)
  • core: auto-open browser for Cloud setup URL during create-nx-workspace (#​35014)
  • core: allow generate command to skip project graph creation (#​35170)
  • core: remove polygraph cloud passthrough (#​35153)
  • core: use CNW variant 1 cloud prompt in nx init (#​35155)
  • core: add source map annotations to nx show target (#​35225)
  • core: prompt for setup mode when running nx init in empty git directory (#​35226)
  • core: add json input type for selective JSON field hashing (#​35248)
  • core: update nx-set-shas usage to v5 (#​34934)
  • core: add NX_BAIL environment variable (#​34711)
  • core: add page up/down to tui shortcuts (#​34525)
  • core: add logging and progress message types to daemon (#​35342)
  • dotnet: add ci-workflow generator (#​33321)
  • js: support nx.sync.ignoredDependencies in typescript-sync (#​35401)
  • misc: a/b test cloud prompt copy in create-nx-workspace (#​35039)
  • misc: update nx init telemetry meta from CSV to JSON format (#​35076)
  • misc: lock in CNW cloud prompt A/B winner and add new variants (#​35154)
  • nx-dev: add conditional blog/changelog proxy in edge function (#​35043)
  • nx-dev: add nx-blog sitemap to root sitemap index (#​35363)
  • repo: add nx-labs repo target and use glob pattern for update-all-repos (#​34999)
  • repo: enable tsgo compiler for nx package (#​35047)
  • repo: enforce no-disabled-tests via ESLint with per-project warning caps (#​35122)
  • repo: add e2e test for nx build process verification (#​35119)
  • vite: add compiler option to vite plugin for tsgo support (#​35429, #​33821, #​35047, #​35167)
🩹 Fixes

❗ Important

βœ‚ PR body was truncated to here.


Configuration

πŸ“… Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

β™» Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from ABGEO as a code owner August 26, 2026 18:03
@renovate
renovate Bot enabled auto-merge (squash) August 26, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants