Skip to content
Heist/ feed
MediumFix available

Nx: Path traversal in nx migrate package-migrations extraction

Type: advisorySource: OSV1 source record

## Summary `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. ## Severity Exploitable when the victim runs `nx migrate` against a package the attacker controls, directly or through a trusted package's `packageGroup`. The primary impact is a file write with attacker-controlled content and no path confinement; over

Announced Source revision 1
Original source ↗

GHSA-hrvq-x7jp-36xv

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: osv:GHSA-hrvq-x7jp-36xv

nx

Source reference: /affected/0/package/name

Affected versions
Not stated in this record
Fixed versions
22.7.10

Source reference: /affected/0/ranges

Prerequisites
Not stated in this record

nx

Source reference: /affected/1/package/name

Affected versions
Not stated in this record
Fixed versions
23.2.1

Source reference: /affected/1/ranges

Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "ranges": [
      {
        "type": "SEMVER",
        "events": [
          {
            "introduced": "13.10.0"
          },
          {
            "fixed": "22.7.10"
          }
        ]
      }
    ],
    "package": {
      "name": "nx",
      "purl": "pkg:npm/nx",
      "ecosystem": "npm"
    },
    "database_specific": {
      "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-hrvq-x7jp-36xv/GHSA-hrvq-x7jp-36xv.json"
    }
  },
  {
    "ranges": [
      {
        "type": "SEMVER",
        "events": [
          {
            "introduced": "23.0.0"
          },
          {
            "fixed": "23.2.1"
          }
        ]
      }
    ],
    "package": {
      "name": "nx",
      "purl": "pkg:npm/nx",
      "ecosystem": "npm"
    },
    "database_specific": {
      "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-hrvq-x7jp-36xv/GHSA-hrvq-x7jp-36xv.json"
    }
  }
]
Related CVEs
CVE-2026-104853

Source reference: /aliases

Publisher severity

medium

Source reference: /severity/0/score

Linked CVE context

These ratings describe the referenced vulnerabilities and products. They are not a severity rating for every application using this dependency.

Event
#85950 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement