{"id":"CVE-2026-119282","aliases":["EUVD-2026-113391","GHSA-qm8w-vx34-5j9j"],"status":"published","title":"Nx: OS command injection via nx.json plugin options in @nx/maven and @nx/gradle","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.","severity":{"version":"4.0","score":7.3,"vector":"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","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.0014,"percentile":0.03437,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-78","CWE-88"],"published":"2026-10-29T21:07:46Z","modified":"2026-11-03T16:50:52Z","fixes":[{"ecosystem":"npm","package":"@nx/maven","fixed_in":["22.7.9","23.1.2"],"sources":["ghsa","osv"]},{"ecosystem":"npm","package":"@nx/gradle","fixed_in":["22.7.9","23.1.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"@nx/maven","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"22.0.2"},{"fixed":"22.7.9"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@nx/maven","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"23.0.0"},{"fixed":"23.1.2"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@nx/gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"21.0.0"},{"fixed":"22.7.9"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@nx/gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"23.0.0"},{"fixed":"23.1.2"}]}]},{"source":"osv","ecosystem":"npm","package":"@nx/maven","ranges":[{"type":"SEMVER","events":[{"introduced":"22.0.2"},{"fixed":"22.7.9"}]}]},{"source":"osv","ecosystem":"npm","package":"@nx/maven","ranges":[{"type":"SEMVER","events":[{"introduced":"23.0.0"},{"fixed":"23.1.2"}]}]},{"source":"osv","ecosystem":"npm","package":"@nx/gradle","ranges":[{"type":"SEMVER","events":[{"introduced":"21.0.0"},{"fixed":"22.7.9"}]}]},{"source":"osv","ecosystem":"npm","package":"@nx/gradle","ranges":[{"type":"SEMVER","events":[{"introduced":"23.0.0"},{"fixed":"23.1.2"}]}]}],"products":[{"vendor":"@nx","product":"gradle"},{"vendor":"@nx","product":"maven"},{"vendor":"apache","product":"maven"},{"vendor":"gradle","product":"gradle"},{"vendor":"nrwl","product":"nx"},{"vendor":"siemens","product":"nx"}],"references":[{"url":"https://github.com/nrwl/nx/security/advisories/GHSA-qm8w-vx34-5j9j","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/nrwl/nx/pull/36626","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/nrwl/nx/commit/02c5d59e8dbbbe30963c0181c6a22cd8c1190a25","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/nrwl/nx/commit/60196b7cfcffcada35b6b90e53bf1a78d049b548","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/nrwl/nx/commit/c227f4780b054c512965c73aa480a48f9f781409","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/nrwl/nx/releases/tag/22.7.9","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/nrwl/nx/releases/tag/23.1.2","tags":["x_refsource_MISC","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-119282","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-qm8w-vx34-5j9j"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/119xxx/CVE-2026-119282.json","tags":["advisory"]},{"url":"https://github.com/nrwl/nx","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-119282","title":"Nx: OS command injection via nx.json plugin options in @nx/maven and @nx/gradle","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.","status":"published","published":"2026-10-29T21:07:46.468Z","modified":"2026-11-03T16:50:52.627Z","cvss":[{"version":"4.0","score":7.3,"vector":"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","level":"high","assessor":"cna"}],"cwes":["CWE-78","CWE-88"],"updated_at":"2026-11-03T17:29:02.209656Z"}],"euvd":[{"id":"EUVD-2026-113391","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.","status":"published","published":"2026-10-29T21:07:46Z","modified":"2026-11-03T16:50:52Z","cvss":[{"version":"4.0","score":7.3,"vector":"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","level":"high"}],"updated_at":"2026-11-03T18:19:04.249016Z"}],"ghsa":[{"id":"GHSA-qm8w-vx34-5j9j","title":"@nx/maven and @nx/gradle have OS command injection via nx.json plugin options","description":"## Summary\n\n`@nx/maven` and `@nx/gradle` spawn their project-graph analyzers through a shell and interpolate plugin options read from `nx.json` straight into the command line. Because a shell parses the whole line, an option value containing shell syntax is executed as a command by any `nx` command that constructs the project graph. Anyone who clones a hostile repository, or who checks out a pull request that edits `nx.json`, runs the injected command with their own privileges.\n\n## Severity\n\nA victim who runs an ordinary `nx` command in an attacker-supplied Maven or Gradle workspace gets code execution as themselves. In most such workspaces an attacker who can write `nx.json` can already run code through the repository's build files (`./mvnw`, `pom.xml`, and the Gradle equivalents), so the genuinely new exposure is narrow — for example CI building a fork's pull request where `nx.json` is writable but the build files are not. We have no evidence of exploitation in the wild.\n\n## Affected \u0026 Patched Versions\n\n| Package | Vulnerable | Patched |\n| --- | --- | --- |\n| `@nx/maven` | `\u003e= 22.0.2, \u003c 22.7.9`; `\u003e= 23.0.0, \u003c 23.1.2` | `22.7.9`, `23.1.2` |\n| `@nx/gradle` | `\u003e= 21.0.0, \u003c 22.7.9`; `\u003e= 23.0.0, \u003c 23.1.2` | `22.7.9`, `23.1.2` |\n\n\u003e [!IMPORTANT]\n\u003e Workspaces that register neither `@nx/maven` nor `@nx/gradle` in `nx.json` are unaffected — the vulnerable code only runs from those plugins' graph-construction paths, and no other Nx plugin shares this pattern.\n\n## Remediation\n\nUpgrade to **22.7.9** (22.x line) or **23.1.2** (23.x line) or later:\n\n```\nnx migrate 23.1.2\n```\n\nUpgrade both `nx` and the affected plugin (`@nx/maven` and/or `@nx/gradle`). The plugin's fix depends on code that ships in the `nx` package, so bumping the plugin without a matching `nx` upgrade will not resolve it.\n\nThere is no configuration to change — upgrading is the whole fix. If you cannot upgrade yet, only run `nx` commands in repositories you trust, since a malicious `nx.json` can execute code on a vulnerable version.\n\n## Details\n\nBoth plugins spawn their analyzer through a shell and interpolate `nx.json` plugin options into the command, so those option values are shell source. For Maven the injectable value is the `targetNamePrefix` option; for Gradle it is broader, since every plugin option is mapped into a `-P` argument and arbitrary option names are accepted, making both the name and value of any option injectable.\n\n## Credits\n\n- **Arkadiusz Marta** (RE:SOURCE) — Reporter","status":"published","published":"2026-10-30T14:42:14Z","modified":"2026-10-30T14:42:16Z","cvss":[{"version":"4.0","score":7.3,"vector":"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","level":"high"}],"cwes":["CWE-78","CWE-88"],"updated_at":"2026-11-02T14:41:41.028239Z"}],"nvd":[{"id":"CVE-2026-119282","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.","status":"published","published":"2026-10-29T22:17:00.887Z","modified":"2026-11-03T17:18:05.677Z","cvss":[{"version":"4.0","score":7.3,"vector":"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","level":"high","assessor":"secondary"}],"cwes":["CWE-78","CWE-88"],"updated_at":"2026-11-03T20:18:18.523956Z"}],"osv":[{"id":"CVE-2026-119282","title":"Nx: OS command injection via nx.json plugin options in @nx/maven and @nx/gradle","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.","status":"published","published":"2026-10-29T21:07:46.468Z","modified":"2026-11-05T02:31:09.541592793Z","cvss":[{"version":"4.0","score":7.3,"vector":"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","level":"high"}],"cwes":["CWE-78","CWE-88"],"updated_at":"2026-11-07T03:08:01.41647Z"},{"id":"GHSA-qm8w-vx34-5j9j","title":"@nx/maven and @nx/gradle have OS command injection via nx.json plugin options","description":"## Summary\n\n`@nx/maven` and `@nx/gradle` spawn their project-graph analyzers through a shell and interpolate plugin options read from `nx.json` straight into the command line. Because a shell parses the whole line, an option value containing shell syntax is executed as a command by any `nx` command that constructs the project graph. Anyone who clones a hostile repository, or who checks out a pull request that edits `nx.json`, runs the injected command with their own privileges.\n\n## Severity\n\nA victim who runs an ordinary `nx` command in an attacker-supplied Maven or Gradle workspace gets code execution as themselves. In most such workspaces an attacker who can write `nx.json` can already run code through the repository's build files (`./mvnw`, `pom.xml`, and the Gradle equivalents), so the genuinely new exposure is narrow — for example CI building a fork's pull request where `nx.json` is writable but the build files are not. We have no evidence of exploitation in the wild.\n\n## Affected \u0026 Patched Versions\n\n| Package | Vulnerable | Patched |\n| --- | --- | --- |\n| `@nx/maven` | `\u003e= 22.0.2, \u003c 22.7.9`; `\u003e= 23.0.0, \u003c 23.1.2` | `22.7.9`, `23.1.2` |\n| `@nx/gradle` | `\u003e= 21.0.0, \u003c 22.7.9`; `\u003e= 23.0.0, \u003c 23.1.2` | `22.7.9`, `23.1.2` |\n\n\u003e [!IMPORTANT]\n\u003e Workspaces that register neither `@nx/maven` nor `@nx/gradle` in `nx.json` are unaffected — the vulnerable code only runs from those plugins' graph-construction paths, and no other Nx plugin shares this pattern.\n\n## Remediation\n\nUpgrade to **22.7.9** (22.x line) or **23.1.2** (23.x line) or later:\n\n```\nnx migrate 23.1.2\n```\n\nUpgrade both `nx` and the affected plugin (`@nx/maven` and/or `@nx/gradle`). The plugin's fix depends on code that ships in the `nx` package, so bumping the plugin without a matching `nx` upgrade will not resolve it.\n\nThere is no configuration to change — upgrading is the whole fix. If you cannot upgrade yet, only run `nx` commands in repositories you trust, since a malicious `nx.json` can execute code on a vulnerable version.\n\n## Details\n\nBoth plugins spawn their analyzer through a shell and interpolate `nx.json` plugin options into the command, so those option values are shell source. For Maven the injectable value is the `targetNamePrefix` option; for Gradle it is broader, since every plugin option is mapped into a `-P` argument and arbitrary option names are accepted, making both the name and value of any option injectable.\n\n## Credits\n\n- **Arkadiusz Marta** (RE:SOURCE) — Reporter","status":"published","published":"2026-10-30T14:42:14Z","modified":"2026-10-30T14:45:04.467456896Z","cvss":[{"version":"4.0","score":7.3,"vector":"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","level":"high"}],"cwes":["CWE-78","CWE-88"],"updated_at":"2026-11-02T15:46:54.760124Z"}]}}
