# CVE-2026-104859: Nx @nx/docker shell injection in release pipeline

Source: https://junglewise.ai/threats/cve-2026-104859-nx-is-a-monorepo-solution-for-typescript-and-polyglot-codebases  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-02. Updated: 2026-10-05  
License: CC BY 4.0 with a link back

CVE-2026-104859 · Severity: high · CVSS 4 · Published 2026-10-02

Nx is a build tool for managing monorepos of TypeScript and other code. The @nx/docker plugin's release pipeline constructs Docker commands by interpolating configuration values into shell strings, allowing an attacker who can modify repository configuration or submit pull requests to inject arbitrary shell commands. This could expose registry credentials, cloud tokens, or allow unauthorized Docker operations with the release job's privileges.

Technologies: [Nrwl Nx](https://junglewise.ai/threats/technologies/nx). Vendors: [npm](https://junglewise.ai/threats/vendors/npm), [Nrwl](https://junglewise.ai/threats/vendors/nrwl).

## Quick answers

**Is CVE-2026-104859 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-104859 being exploited in the wild.

**How severe is CVE-2026-104859?** High severity, with a CVSS score of 4, published 2 October 2026.

**Which products and versions are affected?** @nx/docker (npm) SEMVER:introduced=21.4.0,fixed=22.7.8; Nrwl Nx 21.4.0 to 22.7.7, 23.0.0 to 23.1.0.

**Is there a fix for CVE-2026-104859?** Yes. @nx/docker (npm): upgrade to 22.7.8 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-104859 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-104859?** Check whether you run @nx/docker (npm) or Nrwl Nx at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @nx/docker (npm): upgrade to 22.7.8 or later

  ```sh
  npm install @nx/docker@22.7.8
  ```


## Technical details

The @nx/docker release pipeline builds docker tag, docker push, and docker images invocations as shell command strings with unescaped interpolation of release.docker.repositoryName, registryUrl, version scheme, --docker-version, and NX_DOCKER_IMAGE_REF values, then passes them to /bin/sh -c. An attacker can inject metacharacters (e.g., semicolons) through configuration to execute arbitrary commands during nx release version or nx release publish, even with dry-run enabled. The fix changes command execution to use execFile/execFileSync with argument arrays instead of shell interpretation.

## Affected products

- Nrwl Nx 21.4.0 to 22.7.7, 23.0.0 to 23.1.0

## Identifiers

- CVE-2026-104859
- GHSA-6vc5-vf29-ffr2

## Timeline

- 2026-10-02: disclosed

## References

- [https://github.com/nrwl/nx/commit/6d60eed061f050e0d5af509a1f5a07c707f09865](https://github.com/nrwl/nx/commit/6d60eed061f050e0d5af509a1f5a07c707f09865)
- [https://github.com/nrwl/nx/commit/b587441fd8da28c5db37edb0826554e0060dc81b](https://github.com/nrwl/nx/commit/b587441fd8da28c5db37edb0826554e0060dc81b)

## Related threats

- [Nx shell injection in Maven and Gradle plugins](https://junglewise.ai/threats/cve-2026-119282-nx-is-a-monorepo-solution-for-typescript-and-polyglot-codebases)
- [Nx OS command injection via git revisions and remote refs](https://junglewise.ai/threats/nx-os-command-injection-via-git-revisions-and-remote-refs-0ec6868f)
- [Nx monorepo daemon and plugin worker socket privilege escalation](https://junglewise.ai/threats/cve-2026-104854-nx-is-a-monorepo-solution-for-typescript-and-polyglot-codebases)
- [Nx path traversal in migrate](https://junglewise.ai/threats/cve-2026-104853-nx-is-a-monorepo-solution-for-typescript-and-polyglot-codebases)
- [Nrwl Nx path traversal in self-hosted remote cache](https://junglewise.ai/threats/cve-2026-71476-nrwl-nx-path-traversal-in-self-hosted-remote-cache)
