CVE-2026-104853: Nx: Path traversal in nx migrate package-migrations extraction
nx migrate reads each target package’s nx-migrations.migrations value from its manifest and extracts the referenced file to a path built by joining that value onto a temporary directory. The value is never validated, so a package whose migrations field contains .. segments (or an absolute path) steers the extraction to write outside the temporary directory. A hostile package — or any package pulled in transitively through a trusted package’s packageGroup — can write attacker-controlled content, or truncate an existing file, anywhere the running user can write. This happens during migration planning, before the user reviews the migration list and before --run-migrations, so it does not require the user to approve or execute anything.
Most workspaces need no action. By default nx migrate does not run the nx installed in your workspace — it installs nx@latest into a temporary directory and performs the upgrade planning, including this extraction, with that copy. Now that a patched nx is the latest release, a default nx migrate run is unaffected whatever version the workspace has installed. The installed version only runs, and is only then exposed, when that hand-off is bypassed — see Remediation.
References
- github.com/advisories/GHSA-hrvq-x7jp-36xv
- github.com/nrwl/nx/commit/38cd82a0c05e8212e538bdb87ccb198d6504e58f
- github.com/nrwl/nx/commit/95474ab457e8e1dbdbefad29040c166105a8fb90
- github.com/nrwl/nx/commit/de37c5ebd1852fac700d70726326236ac398af3f
- github.com/nrwl/nx/pull/36887
- github.com/nrwl/nx/releases/tag/22.7.10
- github.com/nrwl/nx/releases/tag/23.2.1
- github.com/nrwl/nx/security/advisories/GHSA-hrvq-x7jp-36xv
- nvd.nist.gov/vuln/detail/CVE-2026-104853
Code Behaviors & Features
Detect and mitigate CVE-2026-104853 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →