CVE-2026-104853: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in nrwl nx
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.
AI Analysis
Technical Summary
Nx is a monorepo solution for TypeScript and polyglot codebases. From versions 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. This allows the migration archive to write attacker-controlled bytes outside the temporary directory, and opening the destination stream can truncate an existing writable file even if no archive entry matches. This occurs during migration planning before review of the migration list or use of --run-migrations. The vulnerable Nx copy is reached when the normal nx@latest handoff is bypassed with environment variables or fallback after a temporary-install failure. The issue is fixed in versions 22.7.10 and 23.2.1.
Potential Impact
An attacker with the ability to influence the migration manifest can cause Nx to write or truncate files outside the intended temporary directory during migration planning. This can lead to unauthorized file modification or data loss. The vulnerability requires local access or the ability to supply a hostile package dependency. The CVSS 4.0 score is 5.8 (medium severity), reflecting limited attack vector (local), low complexity, and partial impact on confidentiality, integrity, and availability.
Mitigation Recommendations
This vulnerability is fixed in Nx versions 22.7.10 and 23.2.1. Users should upgrade to at least one of these versions to remediate the issue. No additional mitigation is required if these versions are in use. Patch status is confirmed by the vendor advisory.
CVE-2026-104853: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in nrwl nx
Description
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.
CVSS v4.0
Score 5.8medium
Affected software
nrwl
nx
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Nx is a monorepo solution for TypeScript and polyglot codebases. From versions 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. This allows the migration archive to write attacker-controlled bytes outside the temporary directory, and opening the destination stream can truncate an existing writable file even if no archive entry matches. This occurs during migration planning before review of the migration list or use of --run-migrations. The vulnerable Nx copy is reached when the normal nx@latest handoff is bypassed with environment variables or fallback after a temporary-install failure. The issue is fixed in versions 22.7.10 and 23.2.1.
Potential Impact
An attacker with the ability to influence the migration manifest can cause Nx to write or truncate files outside the intended temporary directory during migration planning. This can lead to unauthorized file modification or data loss. The vulnerability requires local access or the ability to supply a hostile package dependency. The CVSS 4.0 score is 5.8 (medium severity), reflecting limited attack vector (local), low complexity, and partial impact on confidentiality, integrity, and availability.
Mitigation Recommendations
This vulnerability is fixed in Nx versions 22.7.10 and 23.2.1. Users should upgrade to at least one of these versions to remediate the issue. No additional mitigation is required if these versions are in use. Patch status is confirmed by the vendor advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-10-02T14:38:43.244Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6abfe37da43b0b3b89dc3d36
Added to database: 10/02/2026, 17:01:49 UTC
Last enriched: 10/02/2026, 17:16:04 UTC
Last updated: 10/02/2026, 17:46:47 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.