CVE-2026-119282 Nx: OS command injection via nx.json plugin options in @nx/maven and @nx/gradle
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: total
Description
Nx is a monorepo solution for TypeScript and polyglot codebases. From 22.0.2 until 22.7.9 and 23.1.2 for @nx/maven, and from 21.0.0 until 22.7.9 and 23.1.2 for @nx/gradle, the plugins' project-graph analyzers launch through a shell and interpolate plugin options from nx.json into command arguments. The @nx/maven targetNamePrefix value and arbitrary @nx/gradle option names or values can therefore be interpreted as shell syntax whenever an nx command constructs the project graph. A user who runs Nx in an attacker-controlled repository or pull request can execute injected commands with the user's privileges, while workspaces that register neither affected plugin are not exposed to this path. Remediation requires upgrading both nx and each affected plugin to matching releases because the plugin fix depends on code in the nx package. This issue is fixed in versions 22.7.9 and 23.1.2.
Upgrade path
5 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| nx gradle(npm) | >= 21.0.0, < 22.7.9; >= 23.0.0, < 23.1.2 | 22.7.9, 23.1.2 | Fixed |
| nx maven(npm) | >= 22.0.2, < 22.7.9; >= 23.0.0, < 23.1.2 | 22.7.9, 23.1.2 | Fixed |
| nrwl nx | = >= 21.0.0, < 22.7.9; = >= 23.0.0, < 23.1.2 | No fix listed | Versions listed |
| nx gradle | = >= 21.0.0, < 22.7.9; = >= 23.0.0, < 23.1.2 | No fix listed | Versions listed |
| nx maven | = >= 21.0.0, < 22.7.9; = >= 23.0.0, < 23.1.2 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| nrwl nx | = >= 21.0.0, < 22.7.9 | No fix listed |
| nrwl nx | = >= 23.0.0, < 23.1.2 | No fix listed |
| nx maven | = >= 21.0.0, < 22.7.9 | No fix listed |
| nx maven | = >= 23.0.0, < 23.1.2 | No fix listed |
| nx gradle | = >= 21.0.0, < 22.7.9 | No fix listed |
| nx gradle | = >= 23.0.0, < 23.1.2 | No fix listed |
| nx maven(npm) | >= 22.0.2, < 22.7.9 | 22.7.9 |
| nx maven(npm) | >= 23.0.0, < 23.1.2 | 23.1.2 |
| nx gradle(npm) | >= 21.0.0, < 22.7.9 | 22.7.9 |
| nx gradle(npm) | >= 23.0.0, < 23.1.2 | 23.1.2 |
References
- https://github.com/nrwl/nx/security/advisories/GHSA-qm8w-vx34-5j9j vendor-advisory
- https://github.com/nrwl/nx/pull/36626 patch
- https://github.com/nrwl/nx/commit/02c5d59e8dbbbe30963c0181c6a22cd8c1190a25 patch
- https://github.com/nrwl/nx/commit/60196b7cfcffcada35b6b90e53bf1a78d049b548 patch
- https://github.com/nrwl/nx/commit/c227f4780b054c512965c73aa480a48f9f781409 patch
- https://github.com/nrwl/nx/releases/tag/22.7.9
- https://github.com/nrwl/nx/releases/tag/23.1.2
- Red Hat CVE page vendor-advisory
- Red Hat Bugzilla 2563701 issue-tracking
- www.cve.org
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com
- github.com product
- ENISA EUVD EUVD-2026-113391 third-party-advisory