Nx Maven and Gradle plugins can run attacker commands from nx.json
If you open or run Nx in a project someone else controls, a booby-trapped setting in its nx.json file can make your computer run hidden commands as you. Updating Nx closes this hole.
| Severity | HighCVSS 7.3 of 10 |
|---|---|
| Being exploited? | Not knownNo attacks reported so far |
| Fix available? | Yes@nx/maven and @nx/gradle 22.7.9 (22.x line) or 23.1.2 (23.x line), together with a matching nx upgrade · since 30 Oct 2026 |
| How sure is this? | Official, 2 sourcesBacked by an official source |
How the attack works simplified
- 1Malicious authorEdits nx.json in a repo or pull request
- 2Hostile repositoryVictim clones or checks out the code
- 3Run nx commandProject graph build starts the analyzer
- 4Shell injectionnx.json option values run as shell commands
- ResultAttacker commands run as the victim
What happened
The @nx/maven and @nx/gradle plugins launch their project-graph analyzer through a shell and insert plugin options read from nx.json directly into the command line, so shell syntax in those option values gets executed whenever an nx command builds the project graph.
Are you affected?
You are affected if you use @nx/maven 22.0.2 to before 22.7.9, or 23.0.0 to before 23.1.2, or @nx/gradle 21.0.0 to before 22.7.9, or 23.0.0 to before 23.1.2, in a workspace that registers that plugin in nx.json.
| Package / product | Affected versions | Fixed in |
|---|---|---|
| @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 |
What to do
- Run 'nx migrate 23.1.2' (or 22.7.9 on the 22.x line) to upgrade nx and plugins together
- Upgrade both nx and each affected plugin (@nx/maven and/or @nx/gradle), not just the plugin
- Until upgraded, only run nx commands in repositories you trust
Timeline
- 29 Oct 2026, 22:17 UTCPublicly disclosed
- 29 Oct 2026, 22:17 UTCReported by NVD · NVD
- 29 Oct 2026, 22:17 UTCPicked up by Zero Radar
- 30 Oct 2026, 14:43 UTCGitHub Advisory reported on it · GitHub Advisory
- 30 Oct 2026, 14:43 UTCFixed version published: @nx/maven 22.7.9, @nx/maven 23.1.2, @nx/gradle 22.7.9 · GitHub Advisory
Sources 2 reports, oldest first
Official vendor, government CERT or advisory database
- CVE-2026-119282NVD · 29 Oct 2026, 22:17 UTC
- @nx/maven and @nx/gradle have OS command injection via nx.json plugin optionsGitHub Advisory · 30 Oct 2026, 14:42 UTC
Technical details
- ID
- CVE-2026-119282 · GHSA-qm8w-vx34-5j9j
- CVSS
- 7.3 / 10
- Disclosed
- 29 Oct 2026, 22:17 UTC
- On Zero Radar
- 29 Oct 2026, 22:17 UTC (0 min after disclosure)
- Last change
- 30 Oct 2026, 14:43 UTC
The plain-language parts and the attack diagram were written by an AI model (anthropic/claude-haiku-5.5) from the sources above. Facts like versions, exploitation and dates come from the sources themselves. How Zero Radar works