CVE-2026-28406: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in chainguard-forks kaniko
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 Analysis
Technical Summary
Kaniko, a tool for building container images, improperly limits pathnames during extraction of build context archives in versions >=1.25.4 <1.25.10. It uses filepath.Join(dest, cleanedName) without ensuring the resulting path remains within the destination directory, allowing path traversal via entries like '../outside.txt'. This can lead to files being written outside the intended directory. In environments with registry authentication, this vulnerability can be chained with docker credential helpers to achieve code execution within the executor process. The vulnerability is addressed in version 1.25.10 by adopting securejoin for path resolution during tar extraction.
Potential Impact
The vulnerability allows an attacker to write files outside the intended extraction directory during image build, which can be leveraged to execute arbitrary code within the kaniko executor process in authenticated registry environments. This elevates the risk to high severity due to potential code execution and integrity compromise of the build environment.
Mitigation Recommendations
A fixed version, 1.25.10, is available that addresses this vulnerability by using secure path resolution. Users should upgrade to version 1.25.10 or later to remediate this issue. There is no indication that temporary mitigations or workarounds are provided by the vendor. Patch status is confirmed by the vendor advisory.
CVE-2026-28406: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in chainguard-forks kaniko
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.
CVSS v3.1
Score 8.2high
Affected software
pkg:github/chainguard-forks/kanikoRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Kaniko, a tool for building container images, improperly limits pathnames during extraction of build context archives in versions >=1.25.4 <1.25.10. It uses filepath.Join(dest, cleanedName) without ensuring the resulting path remains within the destination directory, allowing path traversal via entries like '../outside.txt'. This can lead to files being written outside the intended directory. In environments with registry authentication, this vulnerability can be chained with docker credential helpers to achieve code execution within the executor process. The vulnerability is addressed in version 1.25.10 by adopting securejoin for path resolution during tar extraction.
Potential Impact
The vulnerability allows an attacker to write files outside the intended extraction directory during image build, which can be leveraged to execute arbitrary code within the kaniko executor process in authenticated registry environments. This elevates the risk to high severity due to potential code execution and integrity compromise of the build environment.
Mitigation Recommendations
A fixed version, 1.25.10, is available that addresses this vulnerability by using secure path resolution. Users should upgrade to version 1.25.10 or later to remediate this issue. There is no indication that temporary mitigations or workarounds are provided by the vendor. Patch status is confirmed by the vendor advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-02-27T15:33:57.289Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-28406","vendor":"Red Hat"}]
Threat ID: 69a20f8732ffcdb8a275da1b
Added to database: 02/27/2026, 21:41:27 UTC
Last enriched: 07/15/2026, 08:46:28 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 238
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.