Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. nx
  4. ›
  5. GHSA-w2vw-w76x-qr89

GHSA-w2vw-w76x-qr89: Nx: OS command injection via git revisions and remote refs

October 5, 2026

Nx core builds several git invocations as shell command strings with untrusted values interpolated into them, so a value that should be a git revision or ref is parsed by /bin/sh instead. Two entry points are reachable by an attacker: affected commands, where defaultBase / affected.defaultBase from nx.json (and the NX_BASE / NX_HEAD environment variables) reach git merge-base and git diff; and nx import, where a branch name advertised by a remote repository reaches git fetch, git checkout, and git config. In both cases an attacker who controls a repository — or who opens a pull request against one — gets arbitrary command execution on the machine of anyone who runs an ordinary Nx command against it, including CI runners.

The affected path is the more serious of the two. nx affected and nx show projects --affected run constantly in CI, so a pull request that changes nothing but nx.json is enough to execute code on the runner with whatever credentials that job holds.

References

  • github.com/advisories/GHSA-w2vw-w76x-qr89
  • github.com/nrwl/nx/commit/11ab38573478172109bb5306cb30ca4af246caf0
  • github.com/nrwl/nx/commit/4159295a037fdbd8e7f44a33a19d85ab3792415b
  • github.com/nrwl/nx/commit/9ce184a04d2098a4797c8b0d6877ee079b751abf
  • github.com/nrwl/nx/commit/c12850ce7b364db08e325c13541641d754db7123
  • github.com/nrwl/nx/commit/cd9b3c068e17adc9c1722b35b9ca962b98542c20
  • github.com/nrwl/nx/commit/cf996496bbad727362d48292b50fafc8c3665847
  • github.com/nrwl/nx/pull/36348
  • github.com/nrwl/nx/pull/36379
  • github.com/nrwl/nx/releases/tag/22.7.8
  • github.com/nrwl/nx/releases/tag/23.1.1
  • github.com/nrwl/nx/security/advisories/GHSA-w2vw-w76x-qr89

Code Behaviors & Features

Detect and mitigate GHSA-w2vw-w76x-qr89 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 14.0.0 before 22.7.8, all versions starting from 23.0.0 before 23.1.1

Fixed versions

  • 22.7.8
  • 23.1.1

Solution

Upgrade to versions 22.7.8, 23.1.1 or above.

Impact 7.8 HIGH

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
  • CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')

Source file

npm/nx/GHSA-w2vw-w76x-qr89.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:44 +0000.