Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPublish/introduce hostile dependency in tree
-
DeliverySet malicious nx-migrations.migrations path (.. or absolute)
-
ExploitVictim runs nx migrate with local-handoff bypass
-
ExecutionPath join escapes temp directory during planning
-
ImpactWrite attacker bytes or truncate writable file outside temp dir
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires (1) a hostile direct dependency, or a package introduced through a trusted package's packageGroup, that supplies an nx-migrations.migrations value containing '..' segments or an absolute path; (2) the victim invoking nx migrate where the normal nx@latest handoff is bypassed so the vulnerable installed Nx copy runs - triggered by NX_USE_LOCAL, NX_MIGRATE_USE_LOCAL, NX_MIGRATE_CLI_VERSION, --run-id, or the fallback after a temporary-install failure. Affected range is Nx 13.10.0 up to (not including) 22.7.10, and 23.2.x before 23.2.1. Limiting factors: it is a local vector (AV:L) requiring victim action (running migrate), the handoff bypass is non-default behavior, and a malicious package must already be present; however, it fires during migration planning BEFORE the migration list is reviewed or --run-migrations is used, so it is not gated by migration approval. |
| Impact | This is a moderate-risk path traversal (CWE-22) with a vendor-assigned CVSS 4.0 base score of 5.8. The provided vector (AV:L/AC:L/AT:P/PR:N/UI:P) tells a nuanced story that matters more than the headline number: although PR:N marks it unauthenticated, AV:L means it is NOT a remote network attack, AT:P signals a specific attack precondition must hold, and UI:P means a victim must perform an action (running nx migrate). Exploitation is effectively a supply-chain / local scenario, not an internet-facing one. No EPSS score, KEV listing, or public POC is present in the supplied data, so the exploitation status is 'no public exploit identified at time of analysis' - this is not a mass-exploitation candidate. The realistic risk is gated heavily by the requirement that the victim bypass the normal nx@latest handoff (via NX_USE_LOCAL, NX_MIGRATE_USE_LOCAL, NX_MIGRATE_CLI_VERSION, --run-id, or a temporary-install fallback) AND that a hostile dependency is already present in the tree. Technical impact is genuine where conditions hold (arbitrary file write/truncation outside the temp directory, with potential to clobber writable files even when no archive entry matches), so for CI pipelines and developer machines that use local-migration flags this warrants timely patching, but it is a contained developer-tooling risk rather than a high-urgency internet-exposed emergency. Note the vendor's VC:L assignment is debatable: the described primitive is arbitrary file write/truncation (integrity/availability), not data disclosure - verify confidentiality impact with the vendor advisory. |
| Exploit ScenarioDerived | A developer adds or transitively pulls in a malicious npm package whose manifest sets nx-migrations.migrations to a value like '../../../../etc/profile' or an absolute path. When the developer or a CI job runs nx migrate with the local-handoff bypass active (e.g. NX_MIGRATE_USE_LOCAL set), Nx joins the escaping path onto its temp directory during migration planning and writes attacker-controlled bytes - or truncates an existing writable file - outside that directory, before any migration review. No public exploit code is identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 02, 2026
Path traversal in Nx's migration planner lets a hostile dependency write attacker-controlled bytes outside the temporary migration directory - or truncate an existing writable file - because the nx-migrations.migrations value read from a target package manifest is joined onto the temp directory without being validated as a contained relative path. The affected range is Nx 13.10.0 through 22.7.9 and 23.2.x before 23.2.1 (fixed in 22.7.10 and 23.2.1), and exploitation requires both a malicious package already present (a direct dependency or one injected through a trusted package's packageGroup) and the victim running nx migrate with the normal nx@latest handoff bypassed via NX_USE_LOCAL, NX_MIGRATE_USE_LOCAL, NX_MIGRATE_CLI_VERSION, --run-id, or the fallback after a temporary-install failure; the write occurs during migration planning, before the migration list is reviewed or --run-migrations is used. This is a moderate-risk path traversal (CWE-22) with a vendor-assigned CVSS 4.0 base score of 5.8 and an independent assessment of CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:L (high integrity impact, no confidentiality impact); no public exploit identified at time of analysis, and the vulnerability is not listed in CISA KEV.
RemediationAI
Vendor-released patch: upgrade Nx to 22.7.10 or 23.2.1 (or a later release on the corresponding line), per advisory GHSA-hrvq-x7jp-36xv at https://github.com/nrwl/nx/security/advisories/GHSA-hrvq-x7jp-36xv and the release notes at https://github.com/nrwl/nx/releases/tag/22.7.10 and https://github.com/nrwl/nx/releases/tag/23.2.1; because the flaw fires during migration planning before the migration list is reviewed or --run-migrations is passed, upgrading is the only fully effective fix. As a compensating control until you can upgrade, run nx migrate only in its default mode so it hands off to nx@latest instead of executing the vulnerable installed copy - do not set NX_USE_LOCAL, NX_MIGRATE_USE_LOCAL, or NX_MIGRATE_CLI_VERSION, and do not pass --run-id or proceed through the fallback path that runs after a temporary-install failure; the trade-off is that those variables and flags exist for offline, air-gapped, or pinned-version workflows, so the workaround requires registry network access. In addition, audit the dependency graph - including transitive packages pulled in through a trusted package's packageGroup - for any package whose nx-migrations.migrations value is absolute or contains .. segments, and remove or pin it; this is a detection step rather than a reliable blocker because the malicious value is read from the package manifest at plan time, and a strict no-bypass policy materially reduces exposure but does not eliminate risk for automated pipelines that depend on those flags.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Nx is a monorepo build/task-orchestration toolset whose nx migrate command reads a nx-migrations.migrations field (or the string shorthand) from the manifest of each package participating in a migration in order to locate migration scripts. The pre-fix implementation built a destination path by joining that value onto a temporary extraction directory but never checked that the value was a contained relative path; because path.join silently treats absolute paths as relative and normalizes .. segments, a value such as ../../../../etc/profile or /etc/profile escapes the temp directory, letting the migration archive write attacker-controlled bytes elsewhere and letting the opened destination stream truncate an existing writable file even when no archive entry matches. The root cause class is CWE-22 (improper limitation of a pathname to a restricted directory). The upstream fix adds an isContainedRelativePath helper that rejects absolute paths and parent traversal, and applies it both when reading nx-migrations configuration in packages/nx/src/utils/package-json.ts and when resolving prompt files in packages/nx/src/command-line/migrate/prompt-files.ts (PR 36887, commits 38cd82a0c05e8212e538bdb87ccb198d6504e58f, 95474ab457e8e1dbdbefad29040c166105a8fb90, de37c5ebd1852fac700d70726326236ac398af3f). The CPE cpe:2.3:a:nrwl:nx:*:*:*:*:*:*:*:* identifies the Nrwl-published Nx package as the affected product.
Know when Nx gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N
AV:L and UI:R because a local victim must run nx migrate; AC:H because a hostile dependency and non-default local-handoff bypass are required; I:H for arbitrary file write, A:L for truncation, C:N as no disclosure occurs.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Nx is a monorepo solution for TypeScript and polyglot codebases. From 13.10.0 until 22.7.10 and 23.2.1, Nx migration planning reads the nx-migrations.migrations value from a target package manifest without validating that it is a contained relative path. A hostile direct dependency or a package introduced through a trusted package's packageGroup can supply .. segments or an absolute path, causing nx migrate to join an escaping destination onto its temporary directory. The migration archive can then write attacker-controlled bytes outside the temporary directory, while opening the destination stream can truncate an existing writable file even when no archive entry matches. This occurs during migration planning before review of the migration list or use of --run-migrations; the vulnerable installed Nx copy is reached when the normal nx@latest handoff is bypassed with NX_USE_LOCAL, NX_MIGRATE_USE_LOCAL, NX_MIGRATE_CLI_VERSION, --run-id, or fallback after a temporary-install failure. This issue is fixed in versions 22.7.10 and 23.2.1.
Blast Radius
ecosystem impact- 27 npm packages depend on nx (8 direct, 19 indirect)
Ecosystem-wide dependent count for version 13.10.0.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Apache Log4j2 contains a critical JNDI injection vulnerability known as 'Log4Shell' that allows unauthenticated remote c
Embedded malicious code in Nx Console (the editor extension for Nx and Lerna) version 18.95.0 turned a trusted developer
Nx versions prior to V2512 contain an insufficient input validation flaw in the PDF export functionality that permits lo
Command injection in the Nx `@nx/docker` release pipeline (nx 21.4.0 through 22.7.7 and 23.0.0 through 23.1.0) lets an a
Cross-origin information disclosure in the Nx monorepo graph server (versions 17.0.4 through 22.7.1) exposes the full pr
EUVD-2026-91761
GHSA-hrvq-x7jp-36xv
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB