Patch Ticker

kaniko sends Azure access tokens to lookalike registry hosts

The image-building tool can leak Azure account keys to attackers!

Summary

The kaniko build tool can send the build's Azure access token to an attacker-controlled registry host. A Dockerfile that references an image on a lookalike host such as x.azurecr.io.attacker.com is enough, and versions before 1.25.20 are affected.

Affected when

  • Build can reach an Azure identity (service principal, federated workload token or managed identity)
  • Dockerfiles or build arguments you do not fully control

What to do

Update kaniko to 1.25.20 or later. If you cannot, remove Azure credentials from the build environment or set AZURE_ENVIRONMENT=none, which also turns off kaniko's ACR login. If you built untrusted Dockerfiles with an Azure identity available, review that period's Azure logs.

Can't update yet?

Add this line to the config file:

AZURE_ENVIRONMENT=none

A wrong setting can stop the service or lock you out. Check the source links below first.

Products and platforms

  • kaniko

CVE IDs

Sources

Times

First published

First seen