Technical impact
Nx, a monorepo solution for TypeScript, allows developers to run a project graph analyzer that expands plugin options from nx.json into shell command arguments. The @nx/maven targetNamePrefix and arbitrary @nx/gradle option names or values are interpreted as shell syntax when a graph is constructed. An attacker who can inject malicious content into nx.json can therefore cause the Maven or Gradle target to execute arbitrary OS commands with the privileges of the user running the Nx command. This flaw aligns with CWE‑78 (OS Command Injection) and CWE‑88 (Exploitable Filter), providing a direct route to execute attacker‑chosen commands on the host system.
Affected Systems
Affected plugins are @nx/maven and @nx/gradle. For @nx/maven, vulnerabilities exist in versions 22.0.2 through 22.7.9 and in 23.1.2. For @nx/gradle, the affected range is 21.0.0 through 22.7.9 and in 23.1.2. The monorepo manager package nrwl:nx must also be updated to matching releases because the plugin fix relies on code changes in that package.
Risk and Exploitability
The CVSS score of 7.3 indicates a high impact if exploited. The EPSS score is not available, so the current exploitation likelihood cannot be quantified. The vulnerability is not included in the CISA KEV catalog. Exploitation requires an attacker to inject malicious nx.json into a repository or pull request and trigger an NX graph construction, typically during CI or local development. The attack vector is confined to environments where a user runs the NX command; remote network exploitation is not required.
Github GHSA