Nx: OS command injection via git revisions and remote refs
Affects nxSource GCVE Database
CVSS 8.5 High : upgrade to 23.1.1 soon.
Data as of 30 Oct 2026, 08:14 UTC
- Patch
- Available – fixed in 23.1.1
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NWhat to do
Upgrade nx to 23.1.1.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Homebrewnxpkg:brew/nxOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade Nx to version 22.7.8 or later in the 22.x line, or 23.1.1 or later in the 23.x line. The fix is a drop-in upgrade requiring no configuration changes. If upgrading is not possible, treat nx.json files from untrusted sources as executable content, avoid running 'nx affected' commands against unreviewed pull requests, and do not run 'nx import' against untrusted repositories.
Description
Nx versions from 14.0.0 up to but not including 22.7.8, and from 23.0.0 up to but not including 23.1.1, contain a command injection vulnerability. This occurs because Nx builds shell command strings with untrusted git revision or branch name values interpolated directly, allowing an attacker controlling repository content to execute arbitrary commands on machines running Nx commands like 'nx affected' or 'nx import'. The vulnerability is particularly serious in CI environments where these commands run automatically. Fixed in versions 22.7.8 and 23.1.1.
References
- github.com/nrwl/nx/security/advisories/GHSA-w2vw-w76x-qr89 (opens in a new tab)
- github.com/nrwl/nx/pull/36348 (opens in a new tab)
- github.com/nrwl/nx/pull/36379 (opens in a new tab)
- github.com/nrwl/nx/commit/11ab38573478172109bb5306cb30ca4af246caf0 (opens in a new tab)
- github.com/nrwl/nx/commit/4159295a037fdbd8e7f44a33a19d85ab3792415b (opens in a new tab)
- github.com/nrwl/nx/commit/9ce184a04d2098a4797c8b0d6877ee079b751abf (opens in a new tab)
- github.com/nrwl/nx/commit/c12850ce7b364db08e325c13541641d754db7123 (opens in a new tab)
- github.com/nrwl/nx/commit/cd9b3c068e17adc9c1722b35b9ca962b98542c20 (opens in a new tab)
- github.com/nrwl/nx/commit/cf996496bbad727362d48292b50fafc8c3665847 (opens in a new tab)
- github.com/nrwl/nx (opens in a new tab)
- github.com/nrwl/nx/releases/tag/22.7.8 (opens in a new tab)
- github.com/nrwl/nx/releases/tag/23.1.1 (opens in a new tab)