CVE-2026-87114: Kube-compare: container:// reference extraction runs the image entrypoint and silently escalates to sudo

Published Aug 24, 2026
·
Updated

container:// reference extraction executes the untrusted image instead of extracting from a stopped container

CWEs: CWE-829, CWE-250 CVSS: 7.3 (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N) Component: openshift-platform/kube-compare

Description When the -r reference path uses the container:// scheme, getReferencesFromContainer pulls the image and starts it with 'podman/docker run -d <image>' solely so that 'cp' can copy the reference directory out. Running (rather than 'create'-ing) the container executes the image's entrypoint/cmd on the operator's workstation. If only docker is available and the daemon socket requires elevation, runEngineCommand wraps the invocation in sudo, so the untrusted entrypoint executes with root-mediated daemon privileges. A reference image name is frequently copy-pasted from documentation or support instructions, making a look-alike malicious image a realistic vector.

Affected Locations - : - :

Evidence pkg/compare/container.go:88-90 — image is executed, not just mounted go // run because copy requires a running or stopped container // -d to output container ID out, err := engine.runEngineCommand("run", "-d", image)

pkg/compare/container.go:61-63 — docker path may run the untrusted image under sudo go if engine.requiresSudo { args = append([]string{engine.name}, args...) out, err = execCommand("sudo", args...).CombinedOutput()

Attack Pattern A malicious or typo-squatted reference image gains arbitrary code execution on the machine running kube-compare (root-equivalent via the docker daemon on the sudo path).

--- Source: Ex-Wing security assessment, finding FIND-001

Other sources

A flaw was found in kube-compare. When processing a 'container://' reference path, the tool incorrectly executes an untrusted container image's entrypoint instead of merely extracting data from a stopped container. This allows a remote attacker to achieve arbitrary code execution on the operator's workstation. If the Docker daemon requires elevated privileges, the untrusted code may execute with root-mediated daemon privileges, posing a significant security risk.

— MITRE

Affected Software

1 affected component
Openshift kube-compare

Event History

Aug 24, 2026
Data Sourced
via Red Hat·07:19 PM
DescriptionSeverityAffected Software
Sep 28, 2026
CVE Published
via MITRE·04:49 PM
Data Sourced
via MITRE·04:49 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Operators who use kube-compare with a -r reference path using the container:// scheme are exposed. The risk is on the operator's workstation, where the referenced image is pulled and started.

2

What must an attacker do to exploit it?

An attacker needs the operator to use an attacker-controlled or look-alike container image as the container:// reference. Copy-pasted image names from documentation or support instructions are identified as a realistic way this can occur.

3

Does the impact differ between container engines?

Both Podman and Docker are used to start the referenced image, so its entrypoint or command executes. When only Docker is available and access to the daemon socket requires elevation, kube-compare invokes Docker through sudo, giving the untrusted image root-mediated daemon privileges.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203