CVE-2026-28406 kaniko has tar archive path traversal in build context extraction allows writing files outside destination directory

High 8.2 Published Updated

Attackers can write files outside the destination directory during build context extraction, potentially leading to code execution in the executor process.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-28406?

CVE-2026-28406 is a high-severity path traversal vulnerability in chainguard-forks kaniko, published on 27 Feb 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

kaniko is a tool to build container images from a Dockerfile, inside a container or Kubernetes cluster. Starting in version 1.25.4 and prior to version 1.25.10, kaniko unpacks build context archives using `filepath.Join(dest, cleanedName)` without enforcing that the final path stays within `dest`. A tar entry like `../outside.txt` escapes the extraction root and writes files outside the destination directory. In environments with registry authentication, this can be chained with docker credential helpers to achieve code execution within the executor process. Version 1.25.10 uses securejoin for path resolution in tar extraction.

Weakness: CWE-22

Which versions are affected by CVE-2026-28406?

3 open source packages ship an affected version, including github.com/chainguard-dev/kaniko. It affects 1 product.

PackageAffectedFixed in
github.com/chainguard-dev/kaniko GoFrom 1.25.41.25.10
github.com/chainguard-dev/kaniko GoFrom 1.25.41.25.10
github.com/chainguard-dev/kaniko GoFrom 1.25.41.25.10

Products include Chainguard Kaniko.

How do I fix CVE-2026-28406?

Upgrade github.com/chainguard-dev/kaniko to 1.25.10 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-28406 being exploited?

There is no known exploitation of CVE-2026-28406 in the wild and no public exploit code.

Sources

Also known as GHSA-6rxq-q92g-4rmf, GO-2026-4580, MINI-cjrw-6r7q-f796, MINI-vh7j-m52f-57gq.

Is CVE-2026-28406 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free