Impact
The vulnerability arises when kaniko extracts build context tar archives by joining the destination path with each entry name without ensuring the resolved path remains within the intended destination. A crafted archive that contains entries such as '../outside.txt' causes the extraction process to write files outside the destination directory, violating the principle of least privilege. In a container or Kubernetes environment where kaniko is running with registry authentication, the attacker can chain this path traversal with docker credential helpers to execute arbitrary code inside the executor process. The weakness belongs to path traversal (CWE‑22) and can lead to local code execution and compromise of the host running kaniko.
Affected Systems
It affects Chainguard forks' kaniko container images and executables from version 1.25.4 up to, but not including, 1.25.10. Versions released 1.25.10 and newer incorporate a securejoin implementation to prevent the traversal.
Risk and Exploitability
The vulnerability has a CVSS score of 8.2, indicating high severity, yet the exploit probability is very low with an EPSS score below 1 %. It is not listed in CISA’s KEV catalog. The attack requires the attacker to supply a malicious tar archive as part of the build context; no network or privilege escalation outside the build environment is necessary. In a typical scenario, a supply‑chain attacker could embed the malicious payload in a Dockerfile’s context. The failure to enforce path boundaries during extraction permits writing files to arbitrary locations on the host filesystem used by kaniko, potentially enabling the execution of shell commands or the overwriting of critical configuration files.
OpenCVE Enrichment
Github GHSA