chore(deps): update dependency nx to v22 [security] - #1963
Conversation
|
7626012 to
d06db68
Compare
22daf32 to
e972e3a
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e972e3a. Configure here.
e972e3a to
c522f3a
Compare

This PR contains the following updates:
21.2.1→22.7.7Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
nx graphdev server permissive CORS policyCVE-2026-54753 / GHSA-g2r8-wvmj-jf5w
More information
Details
Summary
The local HTTP server started by
nx graphsentAccess-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/helpendpoint, 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 graphand 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).>= 17.0.4, < 22.7.2and>= 23.0.0-beta.0, < 23.0.0-beta.222.7.2+ (backport) and23.0.0(first in23.0.0-beta.2)The wildcard CORS header was introduced in
17.0.4; the/helpexecution endpoint in19.4.0. The21.xline is not patched —21.xusers should upgrade to22.7.2or later.Details
nx graphstarts a local server (defaulthttp://127.0.0.1:4211). Before the fix, its request handler set a wildcard CORS header on every response:The
/helpendpoint runs a target's configured command:A
GET /helpis a CORS "simple request", so a malicious page couldfetch()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
/helpto run anything malicious, a target carrying a malicioushelp.commandmust 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
/help)Credits
Thanks to Nozomu Sasaki (Paul) (@morimori-dev) for finding and responsibly reporting this issue.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:NReferences
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
Two self-hosted cache surfaces are affected:
NX_SELF_HOSTED_REMOTE_CACHE_SERVER, innx) — fixed in the patched release.@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
nxrelease.Remediation
Upgrade to Nx
22.7.7or23.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). Upgradingnxhardens 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-packagesDetails
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 unguardedEntry::unpack(), which performs no containment check: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
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
nrwl/nx (nx)
v22.7.7Compare Source
22.7.7 (2026-07-10)
🩹 Fixes
❤️ Thank You
v22.7.6Compare Source
22.7.6 (2026-06-23)
🩹 Fixes
❤️ Thank You
v22.7.5Compare Source
22.7.5 (2026-05-27)
🩹 Fixes
❤️ Thank You
v22.7.4Compare Source
22.7.4 (2026-05-25)
🩹 Fixes
❤️ Thank You
v22.7.3Compare Source
22.7.3 (2026-05-22)
🚀 Features
🩹 Fixes
projects: 'self'independsOnentries (#35686)$escaping in file paths on windows (#35692)❤️ Thank You
v22.7.2Compare Source
22.7.2 (2026-05-14)
🚀 Features
🩹 Fixes
nx mcpto run outside of an Nx workspace (#35655)❤️ Thank You
v22.7.1Compare Source
22.7.1 (2026-04-28)
🩹 Fixes
❤️ Thank You
v22.7.0Compare Source
22.7.0 (2026-04-24)
🚀 Features
🩹 Fixes
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.