Command injection in registry.testRegistry/testRegistryById remote path

fix(security): command injection in registry.testRegistry/testRegistryById remote path
Command injection in registry.testRegistry/testRegistryById remote pathd3f522-fix-command-injection-in-registry-testregistry-testregistrybyid-cve-2026-72902fixcommand injection registry testregistry testregistrybyid remote

Committed by Siumauricio

commit message
fix(security): command injection in registry.testRegistry/testRegistryById remote path

The remote (execAsyncRemote) path built `echo ${password} | docker ${args.join(" ")}`
with the password, registryUrl and username interpolated unescaped, so a password
like `pw; whoami` ran arbitrary commands as root on the target server. Reuse
safeDockerLoginCommand (already used by create/update), which shell-escapes each
field and feeds the password via --password-stdin. The local argv+stdin path was
already safe.

Editor assessment

This commit patches CVE-2026-72902. The subject reads like a CVE title rather than an instruction, naming command injection in the remote registry test path, which is understandable but not imperative. The body compensates with a clear diagnosis: the remote path built an echo of the password piped into docker with unescaped values, so a password containing a shell separator ran arbitrary commands as root. It explains the reuse of safeDockerLoginCommand, which escapes each field and feeds the password through stdin, and that the local path was already safe. Solid content, weaker styling.

Browse categories

More fix examples · Back to search