Nx: OS command injection via nx.json plugin options in @nx/maven and @nx/gradle (nrwl nx)

CVE-2026-119282
HIGH 7.3

At a glance

Source
NVD
EPSS
EPSS 0.18 % · percentile 8 ()
State
PUBLISHED
Published
Updated
Assigner
GitHub_M
Affected products
nrwl · nx
@nx · maven
@nx · gradle
NVD status
Awaiting Analysis

Description

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.

Weaknesses (CWE)

  • CWE-78 — Improper Neutralization of Special Elements used in an OS Command
  • CWE-88 — Improper Neutralization of Argument Delimiters in a Command

References

Scores

VersionScoreVectorScored by
CVSS 4.0HIGH 7.3CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NGitHub_M
CVSS 4.0HIGH 7.3CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:XNVD · security-advisories@github.com (Secondary)

Advisories

European references

Affected products

ProductAffected versions
nrwl · nx
affected : >= 21.0.0, < 22.7.9
affected : >= 23.0.0, < 23.1.2
@nx · maven
affected : >= 21.0.0, < 22.7.9
affected : >= 23.0.0, < 23.1.2
@nx · gradle
affected : >= 21.0.0, < 22.7.9
affected : >= 23.0.0, < 23.1.2

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD