Skip to main content
Vulnerability Database/CVE-2026-87114

CVE-2026-87114: kube-compare RCE Vulnerability

CVE-2026-87114 is a remote code execution flaw in kube-compare that executes untrusted container image entrypoints, allowing attackers to run arbitrary code on operator workstations. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-87114 Overview

A flaw was found in kube-compare that allows arbitrary code execution when the tool processes a container:// reference path. Instead of extracting data from a stopped container, kube-compare executes the referenced container image's entrypoint. An attacker who convinces an operator to run kube-compare against a malicious image achieves code execution on the operator's workstation. When the Docker daemon runs with elevated privileges, the injected code inherits root-mediated daemon privileges. The weakness is classified as [CWE-829] Inclusion of Functionality from Untrusted Control Sphere.

Critical Impact

Operators processing untrusted container:// references execute attacker-controlled entrypoints, resulting in arbitrary code execution on the workstation with potential root-level privileges via the Docker daemon.

Affected Products

  • Red Hat kube-compare tool (see Red Hat CVE-2026-87114 Advisory)
  • Workstations running kube-compare against untrusted container image references
  • Environments where the Docker daemon operates with elevated privileges

Discovery Timeline

  • 2026-09-28 - CVE CVE-2026-87114 published to NVD
  • 2026-09-29 - Last updated in NVD database

Technical Details for CVE-2026-87114

Vulnerability Analysis

The kube-compare tool accepts container:// reference paths as input sources for comparison operations. The intended behavior extracts static file data from a stopped container without executing any code inside the image. The vulnerable code path instead invokes the container runtime in a way that starts the container and executes its declared entrypoint. This turns a supposedly passive data extraction operation into active code execution under the container runtime.

Exploitation requires an operator to run kube-compare against an attacker-controlled image reference. This user interaction requirement limits mass exploitation but fits typical operator workflows where reference paths are shared, copied from documentation, or pulled from configuration files. Successful exploitation yields code execution in the container context on the operator's workstation.

The severity increases when the local Docker daemon runs with elevated privileges, which is the default on many Linux and macOS installations. In that configuration, the container's entrypoint can access daemon-mediated capabilities including host mounts, privileged devices, and container escape primitives. The result is effective root access on the workstation from a single untrusted reference.

Root Cause

The root cause is improper handling of externally sourced container images, mapped to [CWE-829]. kube-compare treats the referenced image as a trusted source of data and delegates execution to the container runtime instead of performing an offline extraction such as docker create followed by docker cp without docker run.

Attack Vector

The attack requires local execution of kube-compare by the operator and user interaction to supply the malicious container:// reference. An attacker publishes a crafted image, then convinces the operator to include the image reference in a comparison command. When the operator executes the command, the entrypoint runs with the privileges of the Docker daemon. The vulnerability mechanism is described in the Red Hat Bug Report #2522945.

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2026-87114

Indicators of Compromise

  • Unexpected docker run or container runtime create+start invocations spawned as child processes of kube-compare.
  • Outbound network connections initiated from container processes launched during a kube-compare invocation.
  • Container image pulls from untrusted registries immediately preceding kube-compare execution.
  • Docker daemon activity mounting host directories or privileged devices during comparison operations.

Detection Strategies

  • Monitor process trees where kube-compare is the parent of container runtime execution processes rather than image inspection processes.
  • Correlate kube-compare command-line arguments containing container:// with subsequent container start events in host telemetry.
  • Baseline the expected registries and image digests used by operators and alert on deviations.

Monitoring Recommendations

  • Enable command-line auditing on operator workstations to capture kube-compare arguments, including container:// reference values.
  • Forward Docker daemon logs and container runtime events to a centralized log store for correlation with endpoint telemetry.
  • Alert on new container images executed on operator workstations that were not previously observed in the environment.

How to Mitigate CVE-2026-87114

Immediate Actions Required

  • Stop using container:// references in kube-compare against images sourced from untrusted or unverified registries.
  • Restrict kube-compare execution to workstations where the Docker daemon runs with reduced privileges or under a rootless configuration.
  • Review recent kube-compare invocations for container:// references pointing to unknown image digests and investigate the associated workstations.

Patch Information

Refer to the Red Hat CVE-2026-87114 Advisory for fixed package versions and vendor guidance. Apply updates through the standard Red Hat update channels once available for your distribution.

Workarounds

  • Pre-pull and verify image digests against a trusted allowlist before passing them to kube-compare.
  • Run kube-compare under a rootless container runtime to limit the blast radius of unintended entrypoint execution.
  • Execute kube-compare inside an ephemeral, network-isolated sandbox when handling references from external sources.
bash
# Configuration example
# Verify a container image digest against an allowlist before invoking kube-compare
EXPECTED_DIGEST="sha256:<known-good-digest>"
ACTUAL_DIGEST=$(docker image inspect --format='{{index .RepoDigests 0}}' "$IMAGE_REF" | awk -F@ '{print $2}')
if [ "$ACTUAL_DIGEST" != "$EXPECTED_DIGEST" ]; then
  echo "Digest mismatch - refusing to run kube-compare" >&2
  exit 1
fi

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.