All vulnerabilities

npm

CVE-2026-119282

@nx/maven and @nx/gradle have OS command injection via nx.json plugin options

Severity
High
Published
30 Oct 2026
Last changed
30 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
22.7.9, 23.1.2
Exploit chance
0.1% in the next 30 daysHigher than 3% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
OS command injection (CWE-78)Argument injection (CWE-88)
Also known as
GHSA-qm8w-vx34-5j9j
Sources
OSV.dev and GitHub

Description

@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.

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.

From the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
@nx/gradlenpm · osv:npm:@nx/gradle
  • From 21.0.0 before 22.7.9
  • From 23.0.0 before 23.1.2
@nx/mavennpm · osv:npm:@nx/maven
  • From 22.0.2 before 22.7.9
  • From 23.0.0 before 23.1.2

About @nx/gradle

Weekly downloads (npm)
78,014npm, 23 Nov 2026

This is the only vulnerability in @nx/gradle in our list.

About @nx/maven

Weekly downloads (npm)
23,128npm, 23 Nov 2026

This is the only vulnerability in @nx/maven in our list.

References