@nx/maven and @nx/gradle have OS command injection via nx.json plugin options
CVE-2026-119282 · GHSA-qm8w-vx34-5j9j · EUVD-2026-113391 · published 29 Oct 2026
How serious is it
- Severity: high, CVSS score 7.3 out of 10.
- No exploit prediction (EPSS) score yet.
- Not on the CISA list of exploited vulnerabilities.
- No public exploit in Exploit-DB.
Is your app affected by CVE-2026-119282?
Paste this prompt into Claude Code, Cursor or any AI coding tool: it runs a free Shippable scan of your project and fixes what it finds. Built with Lovable, Bolt or v0? Scan your live app. Or upload your package file.
Who is affected
@nx/maven(npm) >= 22.0.2, < 22.7.9@nx/maven(npm) >= 23.0.0, < 23.1.2@nx/gradle(npm) >= 21.0.0, < 22.7.9@nx/gradle(npm) >= 23.0.0, < 23.1.2
How to check
- Run
npm ls @nx/mavenin your project to see the installed version, including copies pulled in by other packages. - Run
npm ls @nx/gradlein your project to see the installed version, including copies pulled in by other packages. - Or paste your lockfile into the checker: it lists every package with a known vulnerability, this one included.
- Or run
npx shippable-dev scan localhost:3000in your project folder. It reads your lockfile and flags this vulnerability along with every other known one.
How to fix
Copies a prompt for Claude Code, Cursor or Codex: it checks your lockfiles for this and upgrades it.
- On >= 22.0.2, < 22.7.9: Upgrade
@nx/mavento 22.7.9 or later, commit the lockfile and redeploy. - On >= 23.0.0, < 23.1.2: Upgrade
@nx/mavento 23.1.2 or later, commit the lockfile and redeploy. - On >= 21.0.0, < 22.7.9: Upgrade
@nx/gradleto 22.7.9 or later, commit the lockfile and redeploy. - On >= 23.0.0, < 23.1.2: Upgrade
@nx/gradleto 23.1.2 or later, commit the lockfile and redeploy. - If a vulnerable version was live, check your logs and rotate the secrets that server could read.
The advisory
## Summary
`@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.
## Severity
A 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.
## Affected & Patched Versions
| Package | Vulnerable | Patched |
| --- | --- | --- |
| `@nx/maven` | `>= 22.0.2, < 22.7.9`; `>= 23.0.0, < 23.1.2` | `22.7.9`, `23.1.2` |
| `@nx/gradle` | `>= 21.0.0, < 22.7.9`; `>= 23.0.0, < 23.1.2` | `22.7.9`, `23.1.2` |
> [!IMPORTANT]
> 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.
## Remediation
Upgrade to **22.7.9** (22.x line) or **23.1.2** (23.x line) or later:
```
nx migrate 23.1.2
```
Upgrade 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.
There 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.
## Details
Both 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.
## Credits
- **Arkadiusz Marta** (RE:SOURCE) — Reporter
Check your whole app
Dependencies are only half of it. Free and read-only: before you push, run npx shippable-dev scan localhost:3000 in your project folder, no account needed. For your live app, you prove it's yours with a one-line tag first.
References
- github.com/nrwl/nx/security/advisories/GHSA-qm8w-vx34-5j9j
- github.com/nrwl/nx/pull/36626
- github.com/nrwl/nx/commit/02c5d59e8dbbbe30963c0181c6a22cd8c1190a25
- github.com/nrwl/nx/commit/60196b7cfcffcada35b6b90e53bf1a78d049b548
- github.com/nrwl/nx/commit/c227f4780b054c512965c73aa480a48f9f781409
- github.com/nrwl/nx/releases/tag/22.7.9
- github.com/nrwl/nx/releases/tag/23.1.2
- nvd.nist.gov/vuln/detail/CVE-2026-119282
- github.com/advisories/GHSA-qm8w-vx34-5j9j
- github.com/nrwl/nx
Merged from ENISA EUVD, GitHub Advisory Database, OSV. Last updated 31 Oct 2026. All vulnerabilities · RSS · JSON