CVE-2026-119282
Nx: OS command injection via nx.json plugin options in @nx/maven and @nx/gradle
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.
Fixes and workarounds
Fix
@nx/maven (npm): OSV reports a fixed version 22.7.9. Check the advisory for supported release branches.
Source: OSV GHSA-qm8w-vx34-5j9jFix
@nx/maven (npm): OSV reports a fixed version 23.1.2. Check the advisory for supported release branches.
Source: OSV GHSA-qm8w-vx34-5j9jFix
@nx/gradle (npm): OSV reports a fixed version 22.7.9. Check the advisory for supported release branches.
Source: OSV GHSA-qm8w-vx34-5j9jFix
@nx/gradle (npm): OSV reports a fixed version 23.1.2. Check the advisory for supported release branches.
Source: OSV GHSA-qm8w-vx34-5j9jAffected products and versions
| Product | Versions | Authority |
|---|---|---|
| nx nrwl |
>= 21.0.0, < 22.7.9 (affected) >= 23.0.0, < 23.1.2 (affected) |
CNA: GitHub_M |
| maven @nx |
>= 21.0.0, < 22.7.9 (affected) >= 23.0.0, < 23.1.2 (affected) |
CNA: GitHub_M |
| gradle @nx |
>= 21.0.0, < 22.7.9 (affected) >= 23.0.0, < 23.1.2 (affected) |
CNA: GitHub_M |
@nx/maven@nx/maven
npm |
≥ 22.0.2; < 22.7.9 (affected, semver); OSV events: introduced 22.0.2; fixed 22.7.9Source events (semver)
Other versions: unaffected |
OSV GHSA-qm8w-vx34-5j9j |
@nx/maven@nx/maven
npm |
≥ 23.0.0; < 23.1.2 (affected, semver); OSV events: introduced 23.0.0; fixed 23.1.2Source events (semver)
Other versions: unaffected |
OSV GHSA-qm8w-vx34-5j9j |
@nx/gradle@nx/gradle
npm |
≥ 21.0.0; < 22.7.9 (affected, semver); OSV events: introduced 21.0.0; fixed 22.7.9Source events (semver)
Other versions: unaffected |
OSV GHSA-qm8w-vx34-5j9j |
@nx/gradle@nx/gradle
npm |
≥ 23.0.0; < 23.1.2 (affected, semver); OSV events: introduced 23.0.0; fixed 23.1.2Source events (semver)
Other versions: unaffected |
OSV GHSA-qm8w-vx34-5j9j |
Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.
CVSS assessments
| Version / score | Vector | Authority |
|---|---|---|
| 4.0 / 7.3 high |
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N | CNA: GitHub_M |
| 4.0 / 7.3 high |
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X | NVD: [email protected] |
Exploit evidence
No exploit evidence in collected sources. This is not proof of no exploitation.
References
- https://github.com/nrwl/nx/security/advisories/GHSA-qm8w-vx34-5j9jCNA: GitHub_M · x_refsource_CONFIRM
- https://github.com/nrwl/nx/pull/36626CNA: GitHub_M · x_refsource_MISC
- https://github.com/nrwl/nx/commit/02c5d59e8dbbbe30963c0181c6a22cd8c1190a25CNA: GitHub_M · x_refsource_MISC
- https://github.com/nrwl/nx/commit/60196b7cfcffcada35b6b90e53bf1a78d049b548CNA: GitHub_M · x_refsource_MISC
- https://github.com/nrwl/nx/commit/c227f4780b054c512965c73aa480a48f9f781409CNA: GitHub_M · x_refsource_MISC
- https://github.com/nrwl/nx/releases/tag/22.7.9CNA: GitHub_M · x_refsource_MISC
- https://github.com/nrwl/nx/releases/tag/23.1.2CNA: GitHub_M · x_refsource_MISC
- https://github.com/nrwl/nx/commit/02c5d59e8dbbbe30963c0181c6a22cd8c1190a25[email protected]
- https://github.com/nrwl/nx/commit/60196b7cfcffcada35b6b90e53bf1a78d049b548[email protected]
- https://github.com/nrwl/nx/commit/c227f4780b054c512965c73aa480a48f9f781409[email protected]
- https://github.com/nrwl/nx/pull/36626[email protected]
- https://github.com/nrwl/nx/releases/tag/22.7.9[email protected]
- https://github.com/nrwl/nx/releases/tag/23.1.2[email protected]
- https://github.com/nrwl/nx/security/advisories/GHSA-qm8w-vx34-5j9j[email protected]
- https://github.com/advisories/GHSA-qm8w-vx34-5j9jOSV / GitHub Security Advisories · advisory
- https://osv.dev/vulnerability/GHSA-qm8w-vx34-5j9jOSV / GitHub Security Advisories · osv
For agents and automation
Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.
Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.
Endpoints and access details
https://api.y2.dev/api/v2/cyber/cveshttps://api.y2.dev/api/v2/cyber/cves/{cveId}
A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.
For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.