Nx
Nx: OS command injection in the @nx/docker release pipeline
Nx is a monorepo solution for TypeScript and polyglot codebases. From 21.4.0 until 22.7.8 and from 23.0.0 until 23.1.1, the @nx/docker release pipeline builds docker tag, image lookup, and docker push invocations as shell command strings. The release.docker.repositoryName and registryUrl configuration values are interpolated into those strings and passed to /bin/sh -c, allowing shell syntax in untrusted Nx configuration to execute during nx release version or nx release publish. A pull request or repository configuration change can therefore execute commands with the release job's privileges and expose registry credentials or cloud tokens, and dry-run publishing does not prevent the vulnerable pre-check command from executing. This issue is fixed in versions 22.7.8 and 23.1.1.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 21.4.0, < 22.7.8
- >= 23.0.0, < 23.1.1
Fixed in 22.7.8, 23.1.1
Mitigation
Upgrade nx to 22.7.8 or 23.1.1 or later.
References
- Vendor advisory github.com/nrwl/nx/security/advisories/GHSA-6v…
- Patch github.com/nrwl/nx/pull/36505
- Patch github.com/nrwl/nx/commit/6d60eed061f050e0d5af…
1 more
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.