Intel

AIKIDO-2026-373135

nx is vulnerable to Command Injection

GHSA-w2vw-w76x-qr89Published Aug 5, 2026
August 5, 2026

48

CVE Score

Medium

Command Injection

Are you affected? Scan for Free

TL;DR

The nx CLI builds git commands as shell strings and interpolates untrusted revision and branch values into them before execution. Affected base and head revisions taken from nx.json, the NX_BASE and NX_HEAD environment variables, and --base and --head flags, git refs read back from a workspace migrations.json, and remote branch names used by nx import all reach a shell without escaping. Shell metacharacters such as command substitution in those values execute arbitrary commands on the developer or CI machine when commands like nx affected, nx graph --affected, nx format, nx release plan, the migrate UI, or nx import run. The fix executes git through argument arrays instead of a shell and validates git revisions and SHAs before use.

How do I fix this?

Upgrade the nx library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you run Nx commands such as affected, format, release plan, migrate, or import against workspace configuration, git revisions, or a remote repository whose contents can be influenced by an untrusted source.

Package

Versions

10.0.7 - 22.7.7

Fixed in 22.7.8

23.0.0 - 23.1.0

Fixed in 23.1.1

Background info

nx is vulnerable to Command Injection in versions 10.0.7 - 22.7.7 and 23.0.0 - 23.1.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea