CVE-2026-28406
Received Received - Intake
Path Traversal in Kaniko Allows Remote Code Execution

Publication date: 2026-02-27

Last updated on: 2026-03-06

Assigner: GitHub, Inc.

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 Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-27
Last Modified
2026-03-06
Generated
2026-05-27
AI Q&A
2026-02-28
EPSS Evaluated
2026-05-25
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
chainguard kaniko From 1.25.4 (inc) to 1.25.10 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
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


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart