Executive brief
Pipelines-as-Code is a CI/CD automation tool used to run workflows on Kubernetes clusters in response to GitHub events. Affected versions contain a flaw that allows attackers to redirect GitHub authentication credentials (JWTs) to attacker-controlled servers by manipulating HTTP headers in webhook requests. An attacker can intercept these credentials and use them to gain unauthorized access to GitHub repositories and perform actions on behalf of the compromised GitHub App, potentially leading to data theft, code tampering, or pipeline sabotage.
Technical details
The vulnerability is an insufficient verification of data authenticity (CWE-345) in the GitHub webhook handling logic. Affected versions accept the X-GitHub-Enterprise-Host HTTP header as the GitHub API endpoint for token generation without prior webhook signature validation or verification that the header value matches the repository URL embedded in the signed webhook payload. When a GitHub webhook event containing an installation ID is received, Pipelines-as-Code immediately signs a GitHub App JWT locally and sends it to the API host specified by the untrusted header. An attacker with network access to the webhook endpoint can craft a malicious webhook payload, set X-GitHub-Enterprise-Host to an attacker-controlled server, and intercept the JWT. The attacker can then attempt to exchange the JWT for installation access tokens within the JWT validity window, subject to the GitHub App's configured permissions. For incoming webhooks with validation enabled, the attacker must also possess a valid webhook secret for the target Repository. Patches are available in v0.48.0 and backported versions (0.42.1, 0.39.6, 0.37.8) which validate webhook signatures before token generation and derive the Enterprise host from the repository URL rather than untrusted headers.
Affected products
- OpenShift Pipelines-as-Code < 0.37.8, >= 0.38.0 and < 0.39.6, >= 0.40.0 and < 0.42.1, >= 0.43.0 and < 0.48.0
Timeline
- 2026-06-19: disclosed: Vulnerability initially published in GitHub Advisory Database
- 2026-08-20: advisory: Advisory updated and published with additional details
- 2026-08-20: patched: Patches released: v0.48.0, v0.42.1, v0.39.6, v0.37.8