nx is vulnerable to Command Injection
48
CVE Score
Medium
Command Injection
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.
Upgrade the nx library to the patch version.
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.
10.0.7 - 22.7.7
Fixed in 22.7.823.0.0 - 23.1.0
Fixed in 23.1.1nx is vulnerable to Command Injection in versions 10.0.7 - 22.7.7 and 23.0.0 - 23.1.0.
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.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.