CVE-2026-40161: Tekton Pipelines Git Resolver API Mode Leaks Vulnerability
HIGHCVE-2026-40161 is a HIGH (CVSS 7.7) git resolver api mode leaks vulnerability (CWE-201: Insertion of Sensitive Information Into Sent Data) affecting Tekton Pipelines libraries in the Go ecosystem. The issue involves git resolver api mode leaks system-configured api token to user-controlled serverurl. Remediation is available by upgrading affected packages to version 1.0.2, 1.3.4, 1.6.2, 1.9.3, 1.11.1.
CVE-2026-40161 at a Glance
Security Impact
CVSS: 7.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N).
How to Fix CVE-2026-40161
To remediate this vulnerability, upgrade all affected Tekton Pipelines dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/tektoncd/pipeline to 1.0.2
Upgrade github.com/tektoncd/pipeline to 1.3.4
Upgrade github.com/tektoncd/pipeline to 1.6.2
Upgrade github.com/tektoncd/pipeline to 1.9.3
Upgrade github.com/tektoncd/pipeline to 1.11.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/tektoncd/pipeline
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-40161, inspect your project dependencies for Tekton Pipelines:
inspect dependencies for github.com/tektoncd/pipeline
Analyze the terminal output to locate any version of Tekton Pipelines in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-201: Insertion of Sensitive Information Into Sent Data, where the code transmits data to another actor, but a portion of the data includes sensitive information that should not be accessible to that actor. In Tekton Pipelines, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-40161 Affected Tekton Pipelines Versions
5 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/tektoncd/pipeline
|
Go |
≥ 1.0.0
< 1.0.2
|
1.0.2
|
|
github.com/tektoncd/pipeline
|
Go |
≥ 1.2.0
< 1.3.4
|
1.3.4
|
|
github.com/tektoncd/pipeline
|
Go |
≥ 1.4.0
< 1.6.2
|
1.6.2
|
|
github.com/tektoncd/pipeline
|
Go |
≥ 1.7.0
< 1.9.3
|
1.9.3
|
|
github.com/tektoncd/pipeline
|
Go |
≥ 1.10.0
< 1.11.1
|
1.11.1
|
References
Frequently Asked Questions
What is CVE-2026-40161?
Which Tekton Pipelines versions are affected?
What version fixes CVE-2026-40161?
Is github.com/tektoncd/pipeline affected?
What is the CVSS score of CVE-2026-40161?
What CWE is associated with CVE-2026-40161?
How can I check Go dependencies for CVE-2026-40161?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wjxp-xrpv-xpff",
"modified" : "2026-05-21T21:18:57Z",
"published" : "2026-04-21T18:52:18Z",
"aliases" : [ "CVE-2026-40161" ],
"summary" : "Tekton Pipelines: Git resolver API mode leaks system-configured API token to user-controlled serverURL",
"details" : "### Summary\n\nThe Tekton Pipelines git resolver in API mode sends the system-configured Git API token to a user-controlled `serverURL` when the user omits the `token` parameter. A tenant with TaskRun or PipelineRun create permission can exfiltrate the shared API token (GitHub PAT, GitLab token, etc.) by pointing `serverURL` to an attacker-controlled endpoint.\n\n### Details\n\nThe git resolver's `ResolveAPIGit()` function in `pkg/resolution/resolver/git/resolver.go` constructs an SCM client using the user-supplied `serverURL` and a token obtained via `getAPIToken()`.\n\nWhen the user provides `serverURL` but omits the `token` parameter:\n\n1. `getSCMTypeAndServerURL()` reads `serverURL` directly from user params (`params[ServerURLParam]`) with no validation against the system-configured URL.\n\n2. `secretRef` is set to `nil` because the user did not provide a token parameter.\n\n3. `getAPIToken(ctx, nil, APISecretNameKey)` is called. It detects `apiSecret == nil`, creates a new `secretCacheKey`, and populates it from the system-configured secret (`conf.APISecretName` / `conf.APISecretNamespace` / `SYSTEM_NAMESPACE`).\n\n4. `clientFunc(scmType, serverURL, string(apiToken))` creates an SCM client pointed at the attacker-controlled URL with the system token. The SCM factory sets the token as an `Authorization` header on the HTTP client.\n\n5. All subsequent API calls (`Contents.Find`, `Git.FindCommit`) carry the system token to the attacker URL.\n\n### Impact\n\nThe system Git API token (GitHub PAT, GitLab token, etc.) is exfiltrated to an attacker-controlled endpoint. This token typically has read access to private repositories containing source code, secrets, and CI/CD configurations.\n\nThis follows the same threat model as GHSA-j5q5-j9gm-2w5c (published March 2026): a namespace-scoped tenant with permission to create TaskRuns exploits the git resolver to exfiltrate credentials. The prior advisory involved reading the resolver pod's ServiceAccount token via path traversal. This finding involves redirecting the system Git API token via `serverURL`.\n\n### Patches\n\nFixed in:\n\n- v1.0.2 (release-v1.0.x branch)\n- v1.3.4 (release-v1.3.x branch)\n- v1.6.2 (release-v1.6.x branch)\n- v1.9.3 (release-v1.9.x branch)\n- v1.11.1 (release-v1.11.x branch)\n\nThe fix validates that when `serverURL` is user-provided and differs from the system-configured server URL, the user must also provide their own `token` parameter. Using the system token with a non-system server URL is rejected.\n\n### Workarounds\n\n- **Do not configure a system-level API token** in the git resolver ConfigMap. Instead, require all users to provide their own tokens via the `token` parameter.\n- **Restrict TaskRun creation** — limit which users or ServiceAccounts can create TaskRuns and PipelineRuns that use the git resolver.\n- **Network egress policies** — apply `NetworkPolicy` to the `tekton-pipelines-resolvers` namespace to restrict outbound traffic to known-good Git servers only.\n\n### Affected Versions\n\nAll releases from **v1.0.0** through **v1.10.0**, including all patch releases. The API mode of the git resolver has been present since the resolver was introduced.\n\nReleases prior to v1.0.0 are not affected because the git resolver either did not exist or did not have API mode.\n\n### Acknowledgments\n\nThis vulnerability was reported by Koda Reef (@kodareef5), who provided a detailed analysis and proof-of-concept. Thank you!\n\n### References\n\n- Prior advisory: [GHSA-j5q5-j9gm-2w5c](https://github.com/tektoncd/pipeline/security/advisories/GHSA-j5q5-j9gm-2w5c)\n- Related: #9608 (deprecate `api-token-secret-namespace`)\n- Related: #9609 (SubjectAccessReview for resolver secrets)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/tektoncd/pipeline"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "1.0.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/tektoncd/pipeline"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.2.0"
}, {
"fixed" : "1.3.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/tektoncd/pipeline"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.4.0"
}, {
"fixed" : "1.6.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/tektoncd/pipeline"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.7.0"
}, {
"fixed" : "1.9.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/tektoncd/pipeline"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.10.0"
}, {
"fixed" : "1.11.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/tektoncd/pipeline/security/advisories/GHSA-wjxp-xrpv-xpff"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40161"
}, {
"type" : "WEB",
"url" : "https://github.com/tektoncd/pipeline/issues/9608"
}, {
"type" : "WEB",
"url" : "https://github.com/tektoncd/pipeline/issues/9609"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/tektoncd/pipeline"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-201" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-21T18:52:18Z",
"nvd_published_at" : "2026-04-21T17:16:53Z"
}
}