# CVE-2026-40161: Tekton Pipelines credential exfiltration in Git resolver API mode

Source: https://junglewise.ai/threats/cve-2026-40161-tekton-pipelines-credential-exfiltration-in-git-resolver-api-mode  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-21. Updated: 2026-05-21  
License: CC BY 4.0 with a link back

CVE-2026-40161 · Severity: high · CVSS 7.7 · Published 2026-04-21

Tekton Pipelines is a tool used to automate software building and deployment (CI/CD) within Kubernetes environments. A security flaw in its 'git resolver' component allows a user with basic permissions to trick the system into sending its master authentication tokens (such as GitHub or GitLab access keys) to a server controlled by the attacker. If exploited, this could allow an attacker to gain unauthorized access to private source code repositories and sensitive corporate data.

Technologies: [github.com/tektoncd/pipeline (Go)](https://junglewise.ai/threats/technologies/github-com-tektoncd-pipeline), [Linuxfoundation Tekton Pipelines](https://junglewise.ai/threats/technologies/tekton-pipelines), [Tekton Pipelines](https://junglewise.ai/threats/technologies/pipelines). Vendors: [Go](https://junglewise.ai/threats/vendors/go), [Linuxfoundation](https://junglewise.ai/threats/vendors/linuxfoundation), [Tekton](https://junglewise.ai/threats/vendors/tekton).

## Quick answers

**Is CVE-2026-40161 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-40161 being exploited in the wild.

**How severe is CVE-2026-40161?** High severity, with a CVSS score of 7.7, published 21 April 2026.

**Which products and versions are affected?** github.com/tektoncd/pipeline (Go) >= 1.0.0, <= 1.10.0, SEMVER:introduced=1.0.0,fixed=1.0.2, SEMVER:introduced=1.0.0,fixed=1.0.2,introduced=1.1.0,fixed=1.3.4,introduced=1.4.0,fixed=1.6.2,introduced=1.7.0,fixed=1.9.3,introduced=1.10.0,fixed=1.11.1; Tekton Pipelines >= 1.0.0, < 1.0.2; >= 1.2.0, < 1.3.4; >= 1.4.0, < 1.6.2; >= 1.7.0, < 1.9.3; >= 1.10.0, < 1.11.1.

**Is there a fix for CVE-2026-40161?** Yes. github.com/tektoncd/pipeline (Go): upgrade to 1.0.2, 1.11.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-40161 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-40161?** Check whether you run github.com/tektoncd/pipeline (Go), Linuxfoundation Tekton Pipelines or Tekton Pipelines at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/tektoncd/pipeline (Go): upgrade to 1.0.2, 1.11.1 or later

  ```sh
  go get github.com/tektoncd/pipeline@v1.11.1
  ```


## Technical details

The vulnerability exists in the ResolveAPIGit() function within pkg/resolution/resolver/git/resolver.go. When a user provides a custom 'serverURL' but omits the 'token' parameter, the resolver defaults to using the system-configured Git API token (e.g., GitHub PAT or GitLab token) stored in the controller's secrets. Because the resolver does not validate the user-supplied URL against the system-configured Git server, it transmits the system token in the Authorization header to the attacker-controlled endpoint. This allows a tenant with TaskRun or PipelineRun creation permissions to exfiltrate high-privilege credentials. The fix introduces validation to ensure system tokens are only used with system-configured server URLs.

## Affected products

- TektonCD Tekton Pipelines >= 1.0.0, < 1.11.1

## Identifiers

- CVE-2026-40161
- GHSA-wjxp-xrpv-xpff
- GO-2026-5711

## Timeline

- 2026-03-17: other: Related architectural issues opened regarding secret namespace handling and access reviews.
- 2026-04-21: advisory: Vendor advisory GHSA-wjxp-xrpv-xpff published.
- 2026-04-21: disclosed: CVE-2026-40161 published.

## References

- [https://github.com/tektoncd/pipeline/issues/9608](https://github.com/tektoncd/pipeline/issues/9608)
- [https://github.com/tektoncd/pipeline/issues/9609](https://github.com/tektoncd/pipeline/issues/9609)
- [https://github.com/tektoncd/pipeline/security/advisories/GHSA-wjxp-xrpv-xpff](https://github.com/tektoncd/pipeline/security/advisories/GHSA-wjxp-xrpv-xpff)

## Related threats

- [Tekton Pipelines argument injection in Git resolver revision parameter](https://junglewise.ai/threats/cve-2026-40938-tekton-pipelines-argument-injection-in-git-resolver-revision)
- [Tekton Pipelines DoS via unbounded memory allocation in HTTP resolver](https://junglewise.ai/threats/cve-2026-40924-tekton-pipelines-dos-via-unbounded-memory-allocation-in-http)
- [Tekton Pipelines path traversal in VolumeMount validation](https://junglewise.ai/threats/cve-2026-40923-tekton-pipelines-path-traversal-in-volumemount-validation)
- [Tekton Pipelines regex bypass in trusted resources verification](https://junglewise.ai/threats/cve-2026-25542-tekton-pipelines-regex-bypass-in-trusted-resources-verification)
- [Tekton Pipelines path traversal in git resolver](https://junglewise.ai/threats/cve-2026-33211-tekton-pipelines-path-traversal-in-git-resolver)
