CVE-2026-28406: kaniko has tar archive path traversal in build context extraction allows writing files outside destination directory
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.
Security readout for executives and security teams
Plain-English summary
Kaniko could be tricked into unpacking a crafted build context so files are written outside the intended directory. In CI or Kubernetes build systems, that can damage build integrity and may enable code execution when registry credential helpers are present.
Executive priority
Treat as high priority for build infrastructure. The main risk is compromise of image-build integrity and possible executor-level code execution, not broad internet-facing exploitation based on current evidence.
Technical view
CVE-2026-28406 is a CWE-22 path traversal in chainguard-forks kaniko versions 1.25.4 through before 1.25.10. Tar extraction used filepath.Join with a cleaned entry name but did not enforce containment under the destination. Version 1.25.10 changes extraction path resolution to securejoin.
Likely exposure
Exposure is most likely in CI/CD, container-build, or Kubernetes environments running chainguard-forks kaniko >=1.25.4 and <1.25.10, especially where build context archives can be influenced by users, repositories, or automation.
Exploitation context
The source bundle does not show CISA KEV listing or active exploitation. A crafted tar entry can escape the extraction root; the advisory says registry-authenticated environments may chain this with docker credential helpers for code execution inside the executor process.
Researcher notes
The core issue is path containment failure during tar extraction: cleaned names were joined to the destination without proving the resolved path stayed inside it. The fix references securejoin in version 1.25.10. Do not assume other kaniko distributions are affected unless separately sourced.
Mitigation direction
Upgrade chainguard-forks kaniko to version 1.25.10 or later.
Check vendor and Red Hat guidance for environment-specific status.
Limit who can supply or modify build context archives.
Reduce kaniko job privileges and registry credential scope.
Review pipelines using docker credential helpers with kaniko.
Validation and detection
Inventory kaniko versions used in CI, Kubernetes, and build images.
Flag any chainguard-forks kaniko versions from 1.25.4 through 1.25.9.
Identify pipelines accepting externally influenced tar build contexts.
Confirm upgraded jobs use kaniko 1.25.10 or later.
Review recent build job anomalies and unexpected file writes.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-22: File access and web shell behavior lookup
File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
The affected technology mentions containers, so container-specific ATT&CK technique review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-22 · source CWE mapping
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.