kaniko has tar archive path traversal in build context extraction allows writing files outside destination directory
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/chainguard-dev/kanikoGo | >= 1.25.4, < 1.25.10 | 1.25.10 |
Affected products
3- ghsa-coords2 versionspkg:golang/github.com/chainguard-dev/kanikopkg:rpm/opensuse/govulncheck-vulndb&distro=openSUSE%20Leap%2015.6
>= 1.25.4, < 1.25.10+ 1 more
- (no CPE)range: >= 1.25.4, < 1.25.10
- (no CPE)range: < 0.0.20260317T205859-150000.1.152.1
- chainguard-forks/kanikov5Range: >= 1.25.4, < 1.25.10
Patches
Vulnerability mechanics
References
6- github.com/advisories/GHSA-6rxq-q92g-4rmfghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-28406ghsaADVISORY
- github.com/chainguard-forks/kaniko/commit/a370e4b1f66e6e842b685c8f70ed507964c4b221ghsax_refsource_MISCWEB
- github.com/chainguard-forks/kaniko/pull/326ghsax_refsource_MISCWEB
- github.com/chainguard-forks/kaniko/releases/tag/v1.25.10ghsaWEB
- github.com/chainguard-forks/kaniko/security/advisories/GHSA-6rxq-q92g-4rmfghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.