Skip to content

← Actionable
High, CVSS 7.3amended

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

CVE-2026-119282GHSA-qm8w-vx34-5j9j

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (@nx/gradle 23.1.2, 22.7.9; @nx/maven 23.1.2, 22.7.9), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • npm @nx/gradle

    Affected
    >= 21.0.0, < 22.7.9>= 23.0.0, < 23.1.2
    Fixed in
    22.7.9, 23.1.2
  • npm @nx/maven

    Affected
    >= 22.0.2, < 22.7.9>= 23.0.0, < 23.1.2
    Fixed in
    22.7.9, 23.1.2

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
7.3 · CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N · score source
EPSS
  • CVE-2026-119282: 0.14% estimated exploitation activity in the next 30 days; percentile 3.41 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

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

Severity A victim who runs an ordinary `nx` command in an attacker-supplied Maven or Gradle workspace gets code execution as themselves. In most such workspaces an attacker who can write `nx.json` can already run code through the repository's build files (`./mvnw`, `pom.xml`, and the Gradle equivalents), so the genuinely new exposure is narrow — for example CI building a fork's pull request where `nx.json` is writable but the build files are not. We have no evidence of exploitation in the wild.

Affected &…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from osv record GHSA-qm8w-vx34-5j9j

  2. Revision 1 · created ·

    Published from ghsa record GHSA-qm8w-vx34-5j9j

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-119282

Advisory: @nx/maven and @nx/gradle have OS command injection via nx.json plugin options
IDs: CVE-2026-119282, GHSA-qm8w-vx34-5j9j
Record: https://patchnext.com/advisories/cve-2026-119282 (revision 2, source checked 31 Oct 2026, 06:00 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 7.3)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: @nx/gradle 23.1.2, 22.7.9; @nx/maven 23.1.2, 22.7.9. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm @nx/gradle: affected >= 21.0.0, < 22.7.9; >= 23.0.0, < 23.1.2; fixed in 22.7.9, 23.1.2
- npm @nx/maven: affected >= 22.0.2, < 22.7.9; >= 23.0.0, < 23.1.2; fixed in 22.7.9, 23.1.2

## Suggested inspection (read-only)
- `npm ls @nx/gradle --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.
- `npm ls @nx/maven --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on @nx/gradle, @nx/maven.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-qm8w-vx34-5j9j (GitHub-reviewed advisory GHSA-qm8w-vx34-5j9j lists affected ranges: npm @nx/maven >=22.0.2 =23.0.0 =21.0.0 =23.0.0 <23.1.2)
- Verified: https://osv.dev/vulnerability/GHSA-qm8w-vx34-5j9j (OSV record GHSA-qm8w-vx34-5j9j lists affected ranges: npm @nx/maven >=22.0.2 =23.0.0 =21.0.0 =23.0.0 <23.1.2 (fixed))

Commands are suggestions: review each one before running it.

Loading voting…