---
id: "CVE-2026-119282"
kind: "vulnerability"
aliases: ["CVE-2026-119282"]
title: "Nx: nx.json plugin options let a repo run shell commands"
severity: "high"
cvss: 7.3
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["ci", "gradle", "maven", "monorepo", "nx", "package", "typescript"]
not_affected_if: ["no-@nx/maven-or-@nx/gradle", "trusted-repos-only"]
published_at: "2026-10-29T22:17:00+00:00"
first_seen_at: "2026-10-29T22:27:06+00:00"
updated_at: "2026-10-29T22:28:47+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-119282", "first_seen_at": "2026-10-29T22:27:06+00:00"}]
---

# Nx: nx.json plugin options let a repo run shell commands

Nx's @nx/maven and @nx/gradle plugins pass options from nx.json into a shell when building the project graph. A user who runs Nx in an attacker-controlled repository or pull request can have arbitrary commands run with their privileges.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check whether `@nx/maven` or `@nx/gradle` is registered in `nx.json` and note the installed versions of `nx`, `@nx/maven` and `@nx/gradle`.
- Workspaces that register neither plugin are not exposed to this path, per the advisory.

## Fix

- `nx` and each affected plugin: `22.7.9` or `23.1.2`, matching releases on both lines (for `@nx/maven` and `@nx/gradle` the affected ranges start at `22.0.2` and `21.0.0` respectively).

## Timeline

- 2026-10-29T22:27:06+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-119282

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
