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-40923
5.4

CVE-2026-40923: Tekton Pipelines VolumeMount Path Restriction Bypass via Missing Path Normalization

Amit Schendel
Amit Schendel
Senior Security Researcher

Apr 21, 2026·6 min read·4 visits

No Known Exploit

Executive Summary (TL;DR)

A missing path normalization flaw in Tekton Pipelines allows authenticated attackers to bypass VolumeMount restrictions and overwrite internal directories via path traversal.

CVE-2026-40923 is a path traversal vulnerability in Tekton Pipelines, a Kubernetes-native CI/CD framework. The vulnerability allows an authenticated attacker with permissions to create Task or TaskRun resources to bypass VolumeMount path restrictions. By using '..' path traversal components in a mount path, an attacker can mount volumes over restricted internal Tekton directories, potentially leading to the injection of fake task results, modification of execution scripts, or interference with pipeline coordination state.

Vulnerability Overview

Tekton Pipelines operates as a Kubernetes-native framework for constructing continuous integration and continuous delivery (CI/CD) systems. The framework relies on an internal directory structure, typically housed under /tekton/, to coordinate state, store scripts, and manage execution results between discrete pipeline steps. To protect this internal execution environment, Tekton implements validation logic that restricts user-defined volume mounts from targeting these sensitive directories.

CVE-2026-40923 identifies a CWE-22 path traversal vulnerability within this validation mechanism. The vulnerability exists within the application programming interface (API) validation routines for Task and TaskRun resources. An authenticated attacker can submit a crafted volume mount path that bypasses the directory restrictions enforced by the control plane.

The validation bypass occurs because the API server evaluates the path string without normalizing traversal characters. Once the resource passes validation, the underlying container runtime resolves the path to a restricted directory before mounting the volume. This discrepancy allows attackers to project volumes over critical Tekton operational directories.

Root Cause Analysis

The vulnerability originates in the input validation logic within pkg/apis/pipeline/v1/container_validation.go and pkg/apis/pipeline/v1beta1/task_validation.go. Tekton explicitly restricts VolumeMount paths that target the /tekton/ directory to prevent interference with step coordination. The architecture provisions an exception for the /tekton/home/ directory, which is permitted for user data.

To enforce this restriction, the codebase utilizes the standard library strings.HasPrefix function. The logic checks whether a submitted mount path starts with /tekton/ and subsequently verifies if it starts with the allowed /tekton/home/ prefix. If the path targets /tekton/ but lacks the home subdirectory prefix, the API rejects the resource allocation.

This security control fails because it evaluates the raw string input without canonicalizing the path components. The strings.HasPrefix function performs a literal byte-by-byte comparison and does not interpret parent directory traversal elements (..). Consequently, a path containing traversal characters can satisfy the literal string prefix requirement while semantically representing a completely different directory location.

Code Analysis

The vulnerable validation implementation relies exclusively on literal string matching. The code evaluates the user-provided MountPath property directly against static directory prefixes without resolving relative traversal modifiers.

// Vulnerable implementation
if strings.HasPrefix(vm.MountPath, "/tekton/") &&
    !strings.HasPrefix(vm.MountPath, "/tekton/home") {
    return fmt.Errorf("mount path %s is restricted", vm.MountPath)
}

The patch for CVE-2026-40923 introduces path normalization prior to the prefix evaluation. By routing the MountPath through filepath.Clean(), the application resolves all parent directory traversal elements before verifying the resulting absolute path against the restricted prefixes.

// Patched implementation
cleanedPath := filepath.Clean(vm.MountPath)
if strings.HasPrefix(cleanedPath, "/tekton/") &&
    !strings.HasPrefix(cleanedPath, "/tekton/home") {
    return fmt.Errorf("mount path %s is restricted", vm.MountPath)
}

This fix addresses the root cause of the vulnerability. The filepath.Clean function returns the shortest path name equivalent to the input path by eliminating duplicate separators and evaluating .. elements. Applying this normalization ensures the security boundary evaluates the exact canonical path that the container runtime will eventually mount.

Exploitation Mechanism

Exploitation requires the attacker to possess Kubernetes Role-Based Access Control (RBAC) permissions capable of creating or modifying TaskRun or Pod resources within the target namespace. The attacker crafts a YAML manifest containing a VolumeMount directive tailored to bypass the validation prefix check.

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: malicious-taskrun
spec:
  taskSpec:
    steps:
      - name: exploit-step
        image: alpine
        command: ["/bin/sh", "-c", "echo 'fake-result' > /tekton/results/output"]
        volumeMounts:
          - name: payload-volume
            mountPath: /tekton/home/../results
    volumes:
      - name: payload-volume
        emptyDir: {}

When the Tekton webhook processes this TaskRun, it evaluates the mountPath. The string /tekton/home/../results successfully passes the strings.HasPrefix check because it begins with the exact literal characters /tekton/home/. The webhook approves the resource and delegates execution to the Kubernetes scheduling components.

During container initialization, the container runtime processes the mount request. The runtime normalizes the path as part of standard filesystem operations, resolving /tekton/home/../results to /tekton/results. The runtime then mounts the user-controlled emptyDir volume over the target directory, completing the bypass.

Impact Assessment

Successful exploitation of this vulnerability compromises the data integrity and operational stability of the affected pipeline. By mounting an arbitrary volume over /tekton/results, an attacker gains the ability to manipulate the output artifacts of the current step. Downstream steps that rely on these results will ingest the falsified data, corrupting the pipeline execution logic.

An attacker can also target the /tekton/scripts/ directory, which houses the entrypoint commands for pipeline steps. Overwriting this directory allows the attacker to hijack the execution flow by substituting legitimate scripts with malicious payloads. This capability introduces a pathway for supply chain manipulation, where the CI/CD system deploys compromised artifacts to production environments.

The CVSS v3.1 vector evaluates to 5.4 (Medium), characterized by the network attack vector (AV:N) and low complexity (AC:L). The vulnerability requires low privileges (PR:L) and no user interaction (UI:N). The impacts are constrained to Low Confidentiality and Low Integrity (C:L/I:L), as the attacker only compromises the scope of the specific pipeline execution within their authorized namespace.

Remediation and Mitigation

The definitive remediation for CVE-2026-40923 requires upgrading the Tekton Pipelines deployment to version 1.11.1 or later. The updated release incorporates the filepath.Clean logic into the admission webhooks, ensuring robust path normalization. Administrators should deploy the updated manifests using their standard Kubernetes lifecycle management procedures.

For environments where immediate patching is unfeasible, administrators must deploy Kubernetes Validating Admission Policies, Open Policy Agent (OPA) Gatekeeper, or Kyverno to intercept malicious requests. A custom admission rule can inspect all incoming Task and TaskRun definitions and reject any VolumeMount.mountPath strings containing the .. sequence. This control provides a robust defense-in-depth layer against path traversal variants.

Organizations must continuously audit RBAC assignments to ensure the principle of least privilege. Permissions to create Task, TaskRun, Pipeline, and PipelineRun resources should be strictly limited to trusted CI/CD service accounts and authorized personnel. Restricting namespace access mitigates the blast radius of compromised credentials attempting to exploit this vulnerability.

Official Patches

TektoncdRelease Notes for Version 1.11.1
GitHub AdvisoryGHSA-rx35-6rhx-7858

Technical Appendix

CVSS Score
5.4/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

Affected Systems

Tekton PipelinesKubernetes CI/CD environments

Affected Versions Detail

Product
Affected Versions
Fixed Version
Tekton Pipelines
Tektoncd
< 1.11.11.11.1
AttributeDetail
CWE IDCWE-22
Attack VectorNetwork
CVSS Score5.4
ImpactData Integrity Compromise, Execution Hijack
Exploit StatusUnexploited
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
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.

Vulnerability Timeline

Vulnerability publicly disclosed and GHSA-rx35-6rhx-7858 published
2026-04-21
CVE-2026-40923 assigned and NVD record updated
2026-04-21
Fixed version (1.11.1) released by the Tektoncd project
2026-04-21

References & Sources

  • [1]NVD Record
  • [2]OSV Data

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.