OS command injection in Nx @nx/maven and @nx/gradle via nx.json
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-78.
Summary
The nx package and its @nx/maven and @nx/gradle plugins are affected, with nx and @nx/gradle from 21.0.0 before 22.7.9 and from 23.0.0 before 23.1.2, and @nx/maven from 22.0.2 before 22.7.9 and from 23.0.0 before 23.1.2. The plugins' project-graph analyzers run commands through a shell and insert plugin options from nx.json into command arguments, so shell syntax in those options is interpreted (CWE-78). A user who runs Nx in an attacker-controlled repository or pull request can execute injected commands with that user's privileges. Workspaces that do not register either affected plugin are not exposed.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| nrwl | nx | 21.0.0 to before 22.7.9; 23.0.0 to before 23.1.2 | 22.7.9, 23.1.2 | Patch available | CNA |
| Nx | maven | 21.0.0 to before 22.7.9; 23.0.0 to before 23.1.2 | 22.7.9, 23.1.2 | Patch available | CNA |
| Nx | gradle | 21.0.0 to before 22.7.9; 23.0.0 to before 23.1.2 | 22.7.9, 23.1.2 | Patch available | CNA |
| — | @nx/maven (npm) | 22.0.2 to before 22.7.9 | 22.7.9 | Patch available | GHSA-qm8w-vx34-5j9j |
| — | @nx/maven (npm) | 23.0.0 to before 23.1.2 | 23.1.2 | Patch available | GHSA-qm8w-vx34-5j9j |
| — | @nx/gradle (npm) | 21.0.0 to before 22.7.9 | 22.7.9 | Patch available | GHSA-qm8w-vx34-5j9j |
| — | @nx/gradle (npm) | 23.0.0 to before 23.1.2 | 23.1.2 | Patch available | GHSA-qm8w-vx34-5j9j |
- nx Vendornrwl Affected 21.0.0 to before 22.7.9; 23.0.0 to before 23.1.2 Fixed in 22.7.9, 23.1.2 Patch available CNA
- maven VendorNx Affected 21.0.0 to before 22.7.9; 23.0.0 to before 23.1.2 Fixed in 22.7.9, 23.1.2 Patch available CNA
- gradle VendorNx Affected 21.0.0 to before 22.7.9; 23.0.0 to before 23.1.2 Fixed in 22.7.9, 23.1.2 Patch available CNA
- @nx/maven (npm) Vendor— Affected 22.0.2 to before 22.7.9 Fixed in 22.7.9 Patch available GHSA-qm8w-vx34-5j9j
- @nx/maven (npm) Vendor— Affected 23.0.0 to before 23.1.2 Fixed in 23.1.2 Patch available GHSA-qm8w-vx34-5j9j
- @nx/gradle (npm) Vendor— Affected 21.0.0 to before 22.7.9 Fixed in 22.7.9 Patch available GHSA-qm8w-vx34-5j9j
- @nx/gradle (npm) Vendor— Affected 23.0.0 to before 23.1.2 Fixed in 23.1.2 Patch available GHSA-qm8w-vx34-5j9j
Remediation
Upgrade nx, @nx/maven and @nx/gradle to 22.7.9 or 23.1.2, and upgrade nx together with each affected plugin to matching releases because the plugin fix depends on code in the nx package.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
- Fix · CNA nx (nrwl) Fixed in 22.7.9, 23.1.2
- Fix · CNA maven (@nx) Fixed in 22.7.9, 23.1.2
- Fix · CNA gradle (@nx) Fixed in 22.7.9, 23.1.2
- Fix · GHSA-qm8w-vx34-5j9j @nx/maven (npm) Fixed in 22.7.9 Advisory →
- Fix · GHSA-qm8w-vx34-5j9j @nx/maven (npm) Fixed in 23.1.2 Advisory →
- Fix · GHSA-qm8w-vx34-5j9j @nx/gradle (npm) Fixed in 22.7.9 Advisory →
- Fix · GHSA-qm8w-vx34-5j9j @nx/gradle (npm) Fixed in 23.1.2 Advisory →
Vendor assessments
Timeline
- 2026-10-29 Threatist record created from CVE-2026-119282
- 2026-10-30 Alias added: GHSA-qm8w-vx34-5j9j
- 2026-10-30 Fix available: npm/@nx/[email protected], npm/@nx/[email protected], npm/@nx/[email protected] +1 · GHSA-qm8w-vx34-5j9j
- 2026-10-30 CVSS score added · GHSA-qm8w-vx34-5j9j
- 2026-10-30 Weakness changed · GHSA-qm8w-vx34-5j9j
- 2026-10-30 9 new references · GHSA-qm8w-vx34-5j9j
- 2026-10-31 Priority changed: MEDIUM → LOW
- 2026-11-03 CISA SSVC decision points changed
- 2026-11-06 Affected versions changed · Red Hat
- 2026-11-06 CVSS score added · Red Hat
References
Other 8
- https://github.com/nrwl/nx/security/advisories/GHSA-qm8w-vx34-5j9j
- https://github.com/nrwl/nx/pull/36626
- https://github.com/nrwl/nx/commit/02c5d59e8dbbbe30963c0181c6a22cd8c1190a25
- https://github.com/nrwl/nx/commit/60196b7cfcffcada35b6b90e53bf1a78d049b548
- https://github.com/nrwl/nx/commit/c227f4780b054c512965c73aa480a48f9f781409
- https://github.com/nrwl/nx/releases/tag/22.7.9
- https://github.com/nrwl/nx/releases/tag/23.1.2
- https://github.com/nrwl/nx
More nrwl vulnerabilities
- TI-2026-50091 Nx: Zip-Slip in the self-hosted remote cache CVSS 4.0HIGH 8.7
- TI-2026-66138 Nx daemon and plugin worker sockets are accessible to other local users CVSS 4.0HIGH 8.5
- TI-2026-66140 Nx: OS command injection in the @nx/docker release pipeline CVSS 4.0HIGH 7.3
- TI-2026-39559 Nx: `nx graph` dev server permissive CORS policy CVSS 3.1MEDIUM 5.9
- TI-2026-66137 Nx: Path traversal in nx migrate package-migrations extraction CVSS 4.0MEDIUM 5.8
Sources
- CVE-2026-119282 · CVE Program
- CVE-2026-119282 · NVD
- FIRST EPSS
- GHSA-qm8w-vx34-5j9j · GitHub Advisory Database · CC BY 4.0
- CVE-2026-119282 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences