Tekton Pipelines: VerificationPolicy regex pattern bypass via substring matching
tektoncd pipeline
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/tektoncd/pipeline Go |
|
|
tektoncd pipeline
| Product | Affected | Fixed in |
|---|---|---|
| github.com/tektoncd/pipeline Go |
|
|
1.6.21.9.31.11.1Tekton Pipelines project provides k8s-style resources for declaring CI/CD-style pipelines. Starting in version 0.43.0 and prior to versions 1.0.2, 1.3.4, 1.6.2, 1.9.3, and 1.11.1, trusted resources verification policies match a resource source string (refSource.URI) against spec.resources[].pattern using regexp.MatchString. In Go, regexp.MatchString reports a match if the pattern matches anywhere in the string, so common unanchored patterns (including examples in tekton documentation) can be bypassed by attacker-controlled source strings that contain the trusted pattern as a substring. This can cause an unintended policy match and change which verification mode/keys apply. Versions 1.0.2, 1.3.4, 1.6.2, 1.9.3, and 1.11.1 fix the issue.
From the CVE record · GitHub_M
Trusted resources verification policies can match a pattern anywhere in a source URI rather than requiring a full-string match. An attacker who controls the source string can include a trusted pattern as a substring, causing an unintended policy match that changes which verification mode or keys apply. The input does not specify whether authentication or user interaction is required.
Teams running affected tektoncd pipeline versions starting at 0.43.0 and below the applicable fixed release should check their deployment.