Escape swarm nodeId and registry tag in cluster commands
fix(security): escape swarm nodeId and registry tag in cluster commands
Escape swarm nodeId and registry tag in cluster commandsdf2779-fix-escape-swarm-nodeid-and-registry-tag-cve-2026-72736fixescape swarm nodeid registry tag cluster
Committed by Siumauricio
commit message
fix(security): escape swarm nodeId and registry tag in cluster commands
- cluster.removeWorker: input.nodeId (z.string(), no regex) was interpolated raw
into 'docker node update/rm ${nodeId}' — now shell-quoted.
- swarm image upload (getRegistryCommands): registryTag / imageName were
interpolated raw into 'docker tag'/'docker push' and an echo. registryTag is
built from username and imagePrefix, which have no schema regex, so it was
injectable — now shell-quoted. (The docker login already used
safeDockerLoginCommand, so credentials were already safe.)
- gpu-setup: nodeId (derived from 'docker info', not user input) escaped as
defense-in-depth.
Closes GHSA-4mfc-grxw-6858, GHSA-hfwh-69ch-gv47, GHSA-prwq-2mcm-mvhrEditor assessment
This commit patches CVE-2026-72736. The subject identifies both variables and the command family, escaping swarm nodeId and registry tag in cluster commands. The body is a thorough bulleted audit: cluster.removeWorker accepted a bare string with no regex and interpolated nodeId raw, the swarm image upload path interpolated registryTag and imageName into tag, push and echo, and the gpu-setup nodeId is escaped as defense in depth. It also notes credentials were already handled by safeDockerLoginCommand. Three GHSAs are closed in one footer. Details are strong; exploitability and tests are not stated.