Impact
Kaniko before version 1.25.20 uses the docker-credential-acr-env helper to obtain Azure Container Registry tokens. The helper accepts any hostname that contains .azurecr.io, .azurecr.cn, .azurecr.de or .azurecr.us based on an unanchored regular expression. When a Dockerfile references an image on a look‑alike host such as x.azurecr.io.attacker.com, the helper contacts that host for a token, causing Kaniko to POST the build’s Azure AD service principal, federated identity, or managed identity access token to the attacker‑controlled registry. The stolen token can be used to access Azure Resource Manager resources and exchange it for credentials to any ACR registry the identity can reach, enabling unauthorized access to resources without the build having to run a RUN instruction or push an image.
Affected Systems
The affected product is Kaniko (chainguard-forks:kaniko). All releases prior to 1.25.20 are vulnerable. The fix is available in version 1.25.20 and later, where the helper is hardened to accept a host only if it equals mcr.microsoft.com or a valid Azure ACR domain exactly ending in .azurecr.io, .azurecr.cn, .azurecr.de, or .azurecr.us. The sponsor advises rebuilding the executor, warmer, and docker‑credential‑acr‑env components from v1.25.20 or newer.
Risk and Exploitability
The CVSS score of 9.3 indicates a high‑severity vulnerability. EPSS data is not available, and the issue is not listed in CISA’s KEV catalog. The attack vector is indirect: it requires a build to have an Azure identity in its environment and for the build to reference a registry host controlled by an attacker. Once an attacker obtains the token, they can perform any actions allowed to the identity in Azure Resource Manager and can acquire other ACR credentials. The risk is significant in CI/CD pipelines that use Kaniko for image building against Azure resources, especially when untrusted Dockerfiles are permitted.
OpenCVE Enrichment