CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-28406

Kaniko Build Context Path Traversal via Unsafe Tar Extraction

Alon Barad
Alon Barad
Software Engineer

Mar 1, 2026·5 min read·103 visits

Executive Summary (TL;DR)

Kaniko versions 1.25.4 through 1.25.9 contain a path traversal flaw (CWE-22) during build context unpacking. Attackers can provide a malicious tar archive to overwrite arbitrary files in the container, leading to potential RCE.

A high-severity path traversal vulnerability exists in the Kaniko container image builder, specifically within the `chainguard-forks/kaniko` distribution. The vulnerability resides in the build context extraction logic, where the application fails to properly validate tar archive entries before writing them to the filesystem. By crafting a malicious tarball containing files with relative path sequences (e.g., `../../`), an attacker can escape the intended extraction directory. This allows for arbitrary file writes on the container filesystem, which can potentially lead to Remote Code Execution (RCE) by overwriting system binaries or credential helpers used during the build process.

Vulnerability Overview

Kaniko is a tool designed to build container images from a Dockerfile, inside a container or Kubernetes cluster. A core phase of its operation involves unpacking a 'build context'—typically a compressed tar archive containing the application source code and Dockerfile. This process is expected to occur within a strictly confined directory (the workspace).

CVE-2026-28406 identifies a critical flaw in how Kaniko handles file paths within these archives. When extracting tar entries, the application fails to enforce that the destination path remains within the intended workspace root. This is a classic 'Zip Slip' or 'Tar Slip' vulnerability (CWE-22).

If an attacker can manipulate the build context (common in CI/CD pipelines where developers submit code/artifacts), they can include files with relative path traversals (e.g., ../../usr/bin/malicious). Upon extraction, Kaniko writes these files outside the workspace, overwriting system files on the builder's filesystem. This undermines the integrity of the build environment and facilitates further compromise.

Technical Root Cause

The vulnerability stems from the unsafe usage of Go's path/filepath package during archive iteration. Specifically, the application relied on filepath.Clean and filepath.Join to determine the destination path for extraction. While filepath.Clean canonicalizes a path by removing redundant separators and . elements, it does not strip leading ../ components if they are syntactically valid relative to the input string.

In the vulnerable implementation, the code essentially performed the following operation:

// Vulnerable logic pattern
cleanedName := filepath.Clean(header.Name)
// If header.Name is "../../file", cleanedName remains "../../file"
destination := filepath.Join(extractionRoot, cleanedName)

The filepath.Join function resolves the path lexically. If cleanedName contains directory traversal sequences, the resulting destination path points outside extractionRoot. There was no subsequent check to verify that the resolved absolute path still shared the extractionRoot as its prefix.

Furthermore, the implementation lacked secure handling for symbolic links within the tar archive. A malicious symlink pointing to a parent directory could also be used to bypass path restrictions, allowing subsequent writes to traverse out of the sandbox.

Code Analysis: Fix and Remediation

The remediation involves replacing the naive path joining logic with securejoin, a library specifically designed to safely resolve paths within a chroot-like scope, and adding explicit lexical checks.

The fix was applied in pkg/util/fs_util.go. Below is a comparative analysis of the vulnerable and patched code paths.

Vulnerable Code (Simplified):

// The code simply cleans the name and joins it to the destination
cleanedName := filepath.Clean(hdr.Name)
path := filepath.Join(dest, cleanedName)
// File is written to 'path' immediately without boundary checks

Patched Code (Commit a370e4b1):

// 1. Lexical Validation: Reject explicit parent references immediately
if cleanedName == ".." || strings.HasPrefix(cleanedName, "../") {
    return fmt.Errorf("tar entry %q is not allowed: references parent directory", hdr.Name)
}
 
// 2. Secure Path Resolution: Use securejoin to handle symlinks and boundaries
path, err := securejoin.SecureJoin(dest, cleanedName)
if err != nil {
    return err
}
 
// 3. Post-Resolution Validation (Defense in Depth)
// Ensure the resolved path is actually inside the destination
if !strings.HasPrefix(path, dest) {
    return fmt.Errorf("tar entry %q resolves outside destination directory", hdr.Name)
}

The introduction of github.com/cyphar/filepath-securejoin ensures that even complex symlink attacks are mitigated, as SecureJoin emulates the kernel's path resolution logic in userspace to prevent breakouts.

Exploitation Mechanics

To exploit this vulnerability, an attacker requires the ability to provide a build context to the Kaniko process. This is a standard workflow in CI/CD pipelines where Kaniko builds images based on repository contents.

Attack Vector Construction:

  1. Crafting the Archive: The attacker creates a malicious tarball programmatically. Standard tar utilities often strip leading ../ for safety, so a script (e.g., Python or Go) is required to forcefully inject the traversal sequences.
  2. Target Selection: The attacker targets a sensitive file. A high-value target in container build environments is the Docker credential helper (e.g., docker-credential-gcr or docker-credential-ecr-login).
  3. Execution: The tarball entry is named ../../usr/bin/docker-credential-gcr. The content of this entry is a malicious binary or shell script.
  4. Trigger: When Kaniko unpacks the context, it overwrites the system's credential helper. Later in the build process, when Kaniko attempts to push the built image to a registry, it invokes the credential helper. The malicious code executes with the privileges of the Kaniko process (often root within the container).

Proof of Concept Concept:

import tarfile
 
with tarfile.open("exploit.tar.gz", "w:gz") as tar:
    # Create a file that looks like a credential helper
    tar.add("malicious_script.sh", arcname="../../usr/local/bin/docker-credential-gcr")

Impact Assessment

The impact of CVE-2026-28406 is rated as High (CVSS 8.2). While the vulnerability is technically a path traversal, the context of Kaniko's operation elevates the risk significantly.

Integrity (High): The primary impact is arbitrary file overwrites. An attacker can modify any file the Kaniko process has write access to. In containerized build environments, Kaniko typically runs as root to perform filesystem operations required for image construction.

Confidentiality (Indirect): While the vulnerability is a write-primitive, it can lead to data exfiltration. By replacing binaries that handle secrets (like credential helpers or git wrappers), an attacker can capture authentication tokens or source code during subsequent build steps.

Availability (Low): An attacker could corrupt essential system libraries or binaries, causing the build pipeline to fail repeatedly (Denial of Service).

EPSS & Threat Landscape: As of late February 2026, the EPSS score is relatively low (0.12%), and there are no reports of active exploitation in the wild (CISA KEV negative). However, given the popularity of Kaniko in Kubernetes CI/CD (Tekton, Jenkins X, GitLab), this represents a significant latent risk for supply chain security.

Official Patches

ChainguardPull Request addressing the vulnerability

Fix Analysis (1)

Technical Appendix

CVSS Score
8.2/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L
EPSS Probability
0.12%
Top 69% most exploited

Affected Systems

Kaniko (chainguard-forks distribution)CI/CD Pipelines using KanikoKubernetes Build Pods

Affected Versions Detail

Product
Affected Versions
Fixed Version
kaniko
chainguard-forks
>= 1.25.4, < 1.25.101.25.10
AttributeDetail
CWE IDCWE-22
Attack VectorNetwork (Context Injection)
CVSS v3.18.2 (High)
EPSS Score0.12%
Exploit StatusPoC Available
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1496Resource Hijacking
Impact
T1574Hijack Execution Flow
Persistence
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The software 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 software 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.

Known Exploits & Detection

Internal ResearchExploit methodology described in GHSA advisory involving relative paths in tar headers.

Vulnerability Timeline

Vulnerability Disclosed
2026-02-27
Patch Committed (a370e4b)
2026-02-27
v1.25.10 Released
2026-02-27

References & Sources

  • [1]NVD - CVE-2026-28406
  • [2]GitHub Advisory GHSA-6rxq-q92g-4rmf

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•42 minutes ago•GHSA-2HW4-C9M4-F2FJ
6.5

CVE-2026-54462: Unbounded Request-Body Memory Exhaustion in Knative Admission Webhooks

An uncontrolled resource consumption vulnerability in the knative.dev/pkg/webhook package allows network-adjacent attackers within a Kubernetes cluster to trigger Out-Of-Memory (OOM) terminations of admission controller pods. The admission webhook HTTP server processes incoming AdmissionReview requests through an io.TeeReader and json.Decoder pipeline without enforcing an upper bound on request body size. Due to internal buffer reallocation mechanics, incoming payloads experience a 4.5x memory amplification factor. Because knative.dev/pkg provides the shared webhook server foundation for numerous cloud-native projects—including Knative Serving, Knative Eventing, Tekton, KEDA, Sigstore Policy Controller, and Kpack—exploitation can halt resource admission across entire Kubernetes clusters or bypass critical security validation policies.

Alon Barad
Alon Barad
1 views•10 min read
•about 2 hours ago•CVE-2026-115923
6.5

CVE-2026-115923: Path Traversal and Catalog Rule Bypass in Backstage Catalog Backend

CVE-2026-115923 (GHSA-w658-mh9p-ww8f) is a path traversal and access control bypass vulnerability in Spotify's Backstage developer portal framework, specifically within the @backstage/plugin-catalog-backend package. Prior to patched versions, DefaultCatalogRulesEnforcer evaluated user-supplied URL catalog locations against configured catalog.rules patterns using raw, uncanonicalized strings. Because downstream URL readers canonicalize URLs and resolve dot segments before fetching resources, an authenticated attacker with location registration permissions can supply percent-encoded traversal sequences (such as %2e%2e) to bypass location restrictions and register untrusted catalog entities.

Amit Schendel
Amit Schendel
3 views•9 min read
•about 3 hours ago•CVE-2026-116576
7.8

CVE-2026-116576: OS Command Injection via Unicode Quotation Marks in Node.js systeminformation

CVE-2026-116576 (GHSA-3f7j-7jwc-fxfj) is an OS Command Injection vulnerability (CWE-78) in the Node.js systeminformation library prior to version 5.33.16 on Microsoft Windows. The services() API function dynamically constructs a PowerShell Get-CimInstance command using caller-supplied service names passed through sanitizeShellString(). While the sanitizer strips standard ASCII quotation marks, it permits Unicode typographic quotation marks (U+2018 through U+201E). Because the Windows PowerShell tokenizer recognizes Unicode quotation marks as valid string literal delimiters, an attacker who controls the service name input can break out of the CIM filter string and execute arbitrary PowerShell commands within the security context of the Node.js process.

Alon Barad
Alon Barad
1 views•11 min read
•about 4 hours ago•CVE-2026-116695
5.3

CVE-2026-116695: CSS Sanitizer Bypass via Bad URL Tokenization Differential in Crass

An interpretation conflict vulnerability (CWE-436) exists in the Ruby CSS parser library Crass prior to version 1.0.8. When consuming the remnants of a malformed URL token, the tokenizer erroneously checks the previously consumed character to determine if a valid escape sequence is present. Consequently, a closing parenthesis immediately following an escaped backslash sequence is treated as escaped by Crass, while spec-compliant web browsers treat the closing parenthesis as the end of the bad URL token. Downstream CSS sanitizers such as Sanitize, Loofah, and rails-html-sanitizer that rely on Crass to parse and reserialize untrusted CSS can be bypassed to inject arbitrary CSS declarations, style rules, and external @import directives.

Amit Schendel
Amit Schendel
5 views•11 min read
•about 5 hours ago•CVE-2026-116577
5.3

CVE-2026-116577: Algorithmic Complexity Denial of Service in Tornado HTTP Header Parser

Tornado versions prior to 6.6.0 contain an inefficient algorithmic complexity vulnerability in the HTTP header parser. When processing requests with obsolete line folding (obs-fold), the HTTPHeaders.parse_line method repeatedly concatenates immutable Python strings within a list structure. An unauthenticated remote attacker can send an HTTP request containing thousands of short header continuation lines to trigger quadratic O(N^2) CPU consumption on the main IOLoop thread, starving concurrent connections and resulting in a denial of service.

Alon Barad
Alon Barad
7 views•10 min read
•about 6 hours ago•CVE-2026-116578
2.1

CVE-2026-116578: Open Redirect in Tornado RedirectHandler via URL Normalization and Template Substitution

Tornado versions prior to 6.6.0 contain an open redirect vulnerability (CWE-601) in tornado.web.RedirectHandler. When route templates incorporate regular expression capture groups at the start of a path, directly after a fixed host without a trailing slash, or at the beginning of a destination template, unvalidated URL-decoded parameters allow attackers to manipulate the redirect scheme or network location. Because modern browsers normalize URLs according to the WHATWG specification—treating backslashes as forward slashes and stripping control characters—attackers can bypass naive prefix checks and redirect victims to arbitrary external domains.

Alon Barad
Alon Barad
8 views•11 min read