CVE-2026-28406

kaniko has tar archive path traversal in build context extraction allows writing files outside destination directory

Published Feb 27, 2026 CVSS 3.1 · 8.2 High EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-6rxq-q92g-4rmf kaniko has tar archive path traversal in its build context extraction, allowing file writes outside destination directories
History
Type Values Removed Values Added
First Time appeared Chainguard
Chainguard kaniko
CPEs cpe:2.3:a:chainguard:kaniko:*:*:*:*:*:*:*:*
Vendors & Products Chainguard
Chainguard kaniko
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Chainguard-forks
Chainguard-forks kaniko
Vendors & Products Chainguard-forks
Chainguard-forks kaniko
Type Values Removed Values Added
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.
Title kaniko has tar archive path traversal in build context extraction allows writing files outside destination directory
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 8.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 15, 2026, 1:11 AM
Reserved
Feb 27, 2026, 3:33 PM
Status
Modified
Published
Feb 27, 2026, 10:16 PM
Modified
Jul 15, 2026, 2:19 AM
Severity
Important
Public date
Feb 27, 2026, 9:20 PM