Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. nx
  4. ›
  5. CVE-2026-104853

CVE-2026-104853: Nx: Path traversal in nx migrate package-migrations extraction

October 5, 2026

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 →

Affected versions

All versions starting from 13.10.0 before 22.7.10, all versions starting from 23.0.0 before 23.2.1

Fixed versions

  • 22.7.10
  • 23.2.1

Solution

Upgrade to versions 22.7.10, 23.2.1 or above.

Impact 6.6 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-73: External Control of File Name or Path

Source file

npm/nx/CVE-2026-104853.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:21 +0000.