Tekton Pipelines: VolumeMount path restriction bypass via missing filepath.Clean in /tekton/ check

Description

Summary

A validation bypass in the VolumeMount path restriction allows mounting
volumes under restricted /tekton/ internal paths by using .. path
traversal components. The restriction check uses strings.HasPrefix
without filepath.Clean, so a path like /tekton/home/../results
passes validation but resolves to /tekton/results at runtime.

Details

Tekton Pipelines restricts VolumeMount paths under /tekton/ (except
/tekton/home) to prevent users from interfering with internal
execution state. The validation at
pkg/apis/pipeline/v1/container_validation.go checks mount paths using
strings.HasPrefix without normalizing the path first:

if strings.HasPrefix(vm.MountPath, "/tekton/") &&
    !strings.HasPrefix(vm.MountPath, "/tekton/home") {
    // reject
}

Because /tekton/home is an allowed prefix, a path like
/tekton/home/../results passes both checks. At runtime, the container
runtime resolves .. and the actual mount point becomes
/tekton/results.

The same pattern exists in pkg/apis/pipeline/v1beta1/task_validation.go.

Impact

An authenticated user with Task or TaskRun creation permissions can
mount volumes over internal Tekton paths, potentially:

  • Writing fake task results that downstream pipelines trust
  • Reading or modifying step scripts before execution
  • Interfering with entrypoint coordination state

Patches

(to be filled: fixed in versions X.Y.Z)

Workarounds

  • Use admission controllers (OPA/Gatekeeper, Kyverno) to validate that
    VolumeMount paths do not contain .. components.
  • In multi-tenant setups, restrict who can create Task and TaskRun
    resources via RBAC.

Affected Versions

All versions through v1.10.0 (both v1 and v1beta1 APIs).

Acknowledgments

This vulnerability was reported by @kodareef5.

Basic information

Type
reviewed
Severity
medium
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2026-04-21 20:26:41 UTC
Updated
2026-05-22 15:40:42 UTC
GitHub reviewed
2026-04-21 20:26:41 UTC
NVD published
2026-04-21

EPSS Score

Score Percentile
0.05% 16.22%

CVSS Scores

Base score Version Severity Vector
5.4 3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.

Identifiers

CWEs

CWE id Name
CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Credits

  • kodareef5 (reporter)
  • vdemeester (remediation_developer)
  • aThorp96 (remediation_reviewer)
  • waveywaves (analyst)

Affected packages (5)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
go github.com/tektoncd/pipeline >= 1.10.0, < 1.11.1 1.11.1
go github.com/tektoncd/pipeline >= 1.7.0, < 1.9.3 1.9.3
go github.com/tektoncd/pipeline >= 1.4.0, < 1.6.2 1.6.2
go github.com/tektoncd/pipeline >= 1.2.0, < 1.3.4 1.3.4
go github.com/tektoncd/pipeline >= 1.0.0, < 1.0.2 1.0.2

References

cvelogic Threat Intelligence