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

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), Linuxfoundation Tekton Pipelines, Tekton Pipelines. Vendors: Go, Linuxfoundation, 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
    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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.