CVE-2026-104853: Nx path traversal in migrate

CVE-2026-104853 · Severity: medium · CVSS 4 · Published 2026-10-02

Nx is a build tool for managing large TypeScript and JavaScript codebases. During the migration process, Nx reads a migrations path from a package's manifest file without validating it. An attacker can supply a malicious package as a dependency that specifies an escape path (using .. segments), allowing arbitrary files on disk to be overwritten during migration. This can lead to data corruption or code injection.

Technologies: nx (npm), Nrwl Nx. Vendors: npm, Nrwl.

Quick answers

Is CVE-2026-104853 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-104853 being exploited in the wild.
How severe is CVE-2026-104853?
Medium severity, with a CVSS score of 4, published 2 October 2026.
Which products and versions are affected?
nx (npm) SEMVER:introduced=13.10.0,fixed=22.7.10; Nrwl Nx 13.10.0 to 22.7.9; 23.0.0 to 23.2.0.
Is there a fix for CVE-2026-104853?
Yes. nx (npm): upgrade to 22.7.10 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-104853 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-104853?
Check whether you run nx (npm) or Nrwl Nx at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • nx (npm): upgrade to 22.7.10 or later
    npm install nx@22.7.10

Technical details

The vulnerability exists in the `readNxMigrateConfig` function, which reads the `nx-migrations.migrations` field from package manifests and joins it onto a directory without validating that it is a contained relative path. A hostile direct dependency or package in a trusted packageGroup can supply path traversal sequences or absolute paths, causing the migration archive extraction to write outside the intended temporary directory. The vulnerability is triggered during migration planning before the migration list is reviewed, and can be reached via environment variables or fallback mechanisms that bypass the normal nx@latest handoff.

Affected products

  • nrwl Nx 13.10.0 to 22.7.9; 23.0.0 to 23.2.0

Identifiers

  • CVE-2026-104853
  • GHSA-hrvq-x7jp-36xv

Timeline

  • 2026-10-02: disclosed
  • 2026-09-08: patched: fix committed to master branch

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.