CVE-2026-28406
Path Traversal in Kaniko Allows Remote Code Execution
Publication date: 2026-02-27
Last updated on: 2026-03-06
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| chainguard | kaniko | From 1.25.4 (inc) to 1.25.10 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-22 | The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Attack-Flow Graph
AI Powered Q&A
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, upgrade kaniko to version 1.25.10 or later, as this version uses securejoin for path resolution in tar extraction, preventing path traversal attacks.
Can you explain this vulnerability to me?
This vulnerability exists in kaniko versions starting from 1.25.4 up to but not including 1.25.10. Kaniko unpacks build context archives using a method that does not ensure the extracted files remain within the intended destination directory. Specifically, it uses filepath.Join(dest, cleanedName) without enforcing path restrictions, allowing a tar entry like "../outside.txt" to escape the extraction root and write files outside the destination directory.
In environments where registry authentication is used, this flaw can be exploited in combination with docker credential helpers to achieve code execution within the executor process. The issue was fixed in version 1.25.10 by using a secure path resolution method called securejoin during tar extraction.
How can this vulnerability impact me? :
This vulnerability can lead to unauthorized code execution within the kaniko executor process. An attacker can exploit the path traversal flaw to write files outside the intended directory, potentially overwriting critical files or injecting malicious code.
In environments using registry authentication, this can be chained with docker credential helpers to escalate the impact, allowing an attacker to execute arbitrary code, which can compromise the security and integrity of the build environment.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
I don't know