OS Command Injection in @nx/docker (CVE-2026-104859)
Summary
OS command injection in @nx/docker (CVE-2026-104859). Risk of unauthorized operations or information disclosure. Exploitable via docker. Mitigation: upgrade to 23.1.1 or later.
Original description
The description as published by the source.
Summary
The @nx/docker release pipeline builds its docker invocations as shell command strings, interpolating release.docker.repositoryName and registryUrl from Nx configuration into them. Because those strings are handed to /bin/sh -c, a crafted repository or registry name executes as a command during nx release version and nx release publish. Anyone running a Docker release against a repository whose Nx configuration they do not control — or whose configuration a pull request has changed — executes the injected command with the privileges of the release job, which in CI typically holds registry credentials and cloud tokens.
Severity
Exploitable when someone runs a Docker release against attacker-supplied configuration, with high impact because release jobs hold publishing credentials. There is no known evidence of exploitation in the wild.
Affected & Patched Versions
| Package | Vulnerable | Patched |
|---|---|---|
@nx/docker |
>= 21.4.0, < 22.7.8; >= 23.0.0, < 23.1.1 |
22.7.8, 23.1.1 |
Every published @nx/docker release before the patched versions is affected.
[!IMPORTANT]
--dry-rundoes not protect you: one of the injected commands runs before the dry-run check, so even a dry-run publish reaches a shell.
Remediation
Upgrade to 22.7.8 (22.x line) or 23.1.1 (23.x line) or later:
nx migrate 23.1.1
The fix is a drop-in and requires no configuration change. If you have run nx release version with…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-104859 has been found in @nx/docker.
Attackers can target a specific entry point like docker over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade @nx/docker to 23.1.1 or later.
If unsure, ask your IT team or search "@nx/docker CVE-2026-104859" on the vendor's site.
CVE-2026-104859 (@nx/docker) — CWE-78
Attack surface: docker / release.docker.repositoryName / registryUrl / release.docker
Patched: 23.1.1 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
OS command injection (CWE-78) exists in @nx/docker. Attackers reach the vulnerable code path via docker.
Check the vendor advisory for the affected versions of @nx/docker. Attack surface: docker / release.docker.repositoryName / registryUrl / release.docker.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 23.1.1.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r '@nx/docker' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r '@nx/docker' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
@nx/dockerを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade @nx/docker to 23.1.1ステージング環境で 23.1.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- web github.com
- web github.com
- web github.com
- web github.com
- web nvd.nist.gov
- web github.com