@nx/docker: OS command injection in the @nx/docker release pipeline
## 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-run` does 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 a configura
GHSA-6vc5-vf29-ffr2
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GHSA-6vc5-vf29-ffr2
@nx/docker
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 22.7.8
Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
@nx/docker
Source reference: /affected/1/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 23.1.1
Source reference:
/affected/1/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "21.4.0"
},
{
"fixed": "22.7.8"
}
]
}
],
"package": {
"name": "@nx/docker",
"purl": "pkg:npm/%40nx/docker",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-6vc5-vf29-ffr2/GHSA-6vc5-vf29-ffr2.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "23.0.0"
},
{
"fixed": "23.1.1"
}
]
}
],
"package": {
"name": "@nx/docker",
"purl": "pkg:npm/%40nx/docker",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-6vc5-vf29-ffr2/GHSA-6vc5-vf29-ffr2.json"
}
}
]- Related CVEs
- CVE-2026-104859
Source reference:
/aliases
Publisher severity
high
Source reference: /database_specific/severity
- Event
- #85948 · Revision 1
- Added to Heist Feed
- Publisher date