Intel

AIKIDO-2026-719551

nx is vulnerable to OS Command Injection

OS Command InjectionGHSA-w2vw-w76x-qr89 Published Today

85

High Risk

This Affects:

JSnx
14.0.0 - 22.7.7
Fixed in 22.7.8
23.0.0 - 23.1.0
Fixed in 23.1.1
Are you affected? Scan for Free

TL;DR

Nx builds git merge-base, git diff, and git show calls for affected-project detection, plus fetch, checkout, and config calls inside the GitRepository helper used by nx import, as shell command strings that interpolate revision or branch values from nx.json, NX_BASE/NX_HEAD, or a remote repository. Quoting those values does not stop the injection, since POSIX shells still perform command substitution inside double quotes, so a crafted revision or branch name runs as an arbitrary command with the privileges of the user running nx. The fix replaces these shell-string invocations with argument-array git calls.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you run Nx's affected-project detection or nx import against a repository or remote branch you do not fully trust.

Background info

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

How to fix this

Upgrade the nx library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform