{"schema":"threatline.record/2","record":{"id":"CVE-2026-104859","aliases":["GHSA-6vc5-vf29-ffr2"],"summary":"@nx/docker: OS command injection in the @nx/docker release pipeline","details":"## Summary\n\nThe `@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.\n\n## Severity\n\nExploitable 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.\n\n## Affected & Patched Versions\n\n| Package | Vulnerable | Patched |\n| --- | --- | --- |\n| `@nx/docker` | `>= 21.4.0, < 22.7.8`; `>= 23.0.0, < 23.1.1` | `22.7.8`, `23.1.1` |\n\nEvery published `@nx/docker` release before the patched versions is affected.\n\n> [!IMPORTANT]\n> `--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.\n\n## Remediation\n\nUpgrade to **22.7.8** (22.x line) or **23.1.1** (23.x line) or later:\n\n```\nnx migrate 23.1.1\n```\n\nThe fix is a drop-in and requires no configuration change. If you have run `nx release version` with a configuration you do not trust, delete the generated Docker version file before your next publish, since the composed reference is read back from disk.\n\n## Details\n\nSeveral `docker` commands in the release pipeline (`docker tag` during `nx release version`; the image existence check and `docker push` during `nx release publish`) are built as shell command strings with the image reference interpolated in. The reference is composed from the project's `release.docker` `repositoryName` and `registryUrl`, so a value containing shell syntax is executed rather than passed to `docker`.\n \n\n## Credits\n\n- **Arkadiusz Marta** (RE:SOURCE) — Reporter","categories":["Containers & cloud"],"product":"@nx/docker","vendor":"nrwl","ecosystem":"npm","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-6vc5-vf29-ffr2","source_modified_at":"2026-10-05T23:29:14Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@nx/docker"},"range":">= 21.4.0, < 22.7.8"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-6vc5-vf29-ffr2","source_modified_at":"2026-10-05T23:29:14Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@nx/docker"},"range":">= 23.0.0, < 23.1.1"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-104859","source_modified_at":"2026-10-05T20:09:01.291Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"nx","vendor":"nrwl","versions":[{"version":">= 21.4.0, < 22.7.8","status":"affected"},{"version":">= 23.0.0, < 23.1.1","status":"affected"}],"defaultStatus":null},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-6vc5-vf29-ffr2","source_modified_at":"2026-10-05T23:45:08.226593535Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@nx/docker","purl":"pkg:npm/%40nx/docker"},"ranges":[{"events":[{"introduced":"21.4.0"},{"fixed":"22.7.8"}],"type":"SEMVER"}],"versions":[]},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-6vc5-vf29-ffr2","source_modified_at":"2026-10-05T23:45:08.226593535Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@nx/docker","purl":"pkg:npm/%40nx/docker"},"ranges":[{"events":[{"introduced":"23.0.0"},{"fixed":"23.1.1"}],"type":"SEMVER"}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-6vc5-vf29-ffr2","source_modified_at":"2026-10-05T23:29:14Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@nx/docker"},"version":"22.7.8"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-6vc5-vf29-ffr2","source_modified_at":"2026-10-05T23:29:14Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@nx/docker"},"version":"23.1.1"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-6vc5-vf29-ffr2","source_modified_at":"2026-10-05T23:45:08.226593535Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@nx/docker","purl":"pkg:npm/%40nx/docker"},"version":"22.7.8"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-6vc5-vf29-ffr2","source_modified_at":"2026-10-05T23:45:08.226593535Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@nx/docker","purl":"pkg:npm/%40nx/docker"},"version":"23.1.1"}],"cvss":7.3,"severity":"High","kev":{"listed":false},"epss":{"probability":0.0015,"percentile":0.03844,"score_date":"2026-10-23"},"published_at":"2026-10-02T17:49:37.975Z","modified_at":"2026-10-05T23:45:08.226593535Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-6vc5-vf29-ffr2","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-05T23:29:14Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-104859","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-10-05T20:09:01.291Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-6vc5-vf29-ffr2","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-05T23:45:08.226593535Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-104859","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/nrwl/nx/security/advisories/GHSA-6vc5-vf29-ffr2","tags":["x_refsource_CONFIRM"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-104859","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/nrwl/nx/pull/36505","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/nrwl/nx/commit/6d60eed061f050e0d5af509a1f5a07c707f09865","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/nrwl/nx/commit/b587441fd8da28c5db37edb0826554e0060dc81b","tags":["x_refsource_MISC"]},{"url":"https://github.com/advisories/GHSA-6vc5-vf29-ffr2","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"none","automatable":"no","technical_impact":"total","assessed_at":"2026-10-05T20:08:54.062605Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"product","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-05T23:45:08.226593535Z","content_hash":"833843064702a9666f315d2785dcb94e103a299722813d94bb47802cb766a921"}}
