CVE-2026-54167: High severity go/github.com/openshift-pipelines/pipelines-as-code vulnerability
Impact
Pipelines-as-Code installations using the GitHub App provider are vulnerable to GitHub App credential exfiltration through the webhook endpoint.
Affected versions accepted the X-GitHub-Enterprise-Host request header as the GitHub Enterprise API host during GitHub App token generation. For GitHub webhook events containing an installation.id, Pipelines-as-Code generated a GitHub App JWT and requested an installation access token before validating the webhook signature or checking that the Enterprise host matched the repository URL in the signed payload.
An attacker who can reach the Pipelines-as-Code webhook endpoint can send a crafted GitHub webhook payload containing an installation ID and set X-GitHub-Enterprise-Host to an attacker-controlled host. During token generation, the controller signs a GitHub App JWT locally and sends it to the selected API host. This can disclose the GitHub App JWT to the attacker-controlled service, allowing the attacker to attempt to mint GitHub App installation access tokens within the JWT validity window, subject to the GitHub App installation and permissions.
The incoming webhook flow also trusted X-GitHub-Enterprise-Host during GitHub App installation lookup and token generation. In that path, exploitation requires a valid incoming webhook secret for the target Repository CR.
Patches
The fix validates the webhook signature before GitHub App token generation, verifies that X-GitHub-Enterprise-Host matches the repository URL in the webhook payload, and stops using the request header to select the GitHub Enterprise host for incoming webhook token requests. For incoming webhooks, the Enterprise host is derived from the configured Repository URL instead.
The fix is available in v0.48.0. Supported backport releases will be added here after release tags are published.
Workarounds
Until a patched release is deployed, operators should block or strip unexpected X-GitHub-Enterprise-Host headers at the ingress or proxy in front of the Pipelines-as-Code webhook endpoint. For GitHub.com installations, reject requests that include this header. For GitHub Enterprise Server installations, allow only the expected Enterprise hostname.
Operators should also restrict access to the webhook endpoint to trusted Git provider sources where possible. If exploitation is suspected, rotate the GitHub App private key and review GitHub App installation token activity.
Credits
Reported and fixed by the Pipelines-as-Code maintainers.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/github.com/openshift-pipelines/pipelines-as-codeto a version that resolves this vulnerability.Fixed in 0.37.8 - Upgrade
Upgrade
go/github.com/openshift-pipelines/pipelines-as-codeto a version that resolves this vulnerability.Fixed in 0.39.6 - Upgrade
Upgrade
go/github.com/openshift-pipelines/pipelines-as-codeto a version that resolves this vulnerability.Fixed in 0.42.1 - Upgrade
Upgrade
go/github.com/openshift-pipelines/pipelines-as-codeto a version that resolves this vulnerability.Fixed in 0.48.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in v0.48.0 - Configuration
Until the patched release is deployed, block or strip unexpected `X-GitHub-Enterprise-Host` headers at the ingress or proxy in front of the Pipelines-as-Code webhook endpoint.
Pipelines-as-Code webhook endpoint X-GitHub-Enterprise-Host header handling = block or strip unexpected values - Configuration
For GitHub Enterprise Server installations, allow only the expected Enterprise hostname (derived from the configured Repository URL) instead of accepting an attacker-supplied `X-GitHub-Enterprise-Host` during incoming webhook token requests.
Pipelines-as-Code GitHub Enterprise Server installations Allowed Enterprise hostname for X-GitHub-Enterprise-Host = only the expected Enterprise hostname - Configuration
For GitHub.com installations, reject webhook requests that include the `X-GitHub-Enterprise-Host` header.
Pipelines-as-Code GitHub.com installations Reject requests with X-GitHub-Enterprise-Host header = reject - Compensating control
Restrict access to the Pipelines-as-Code webhook endpoint to trusted Git provider sources where possible.
- Operational
If exploitation is suspected, rotate the GitHub App private key and review GitHub App installation token activity.
Event History
Frequently Asked Questions
Which deployments are exposed?
Pipelines-as-Code installations using the GitHub App provider are exposed when an attacker can reach the webhook endpoint.
Does an attacker need a valid webhook signature to trigger token generation?
No. The affected flow generated a GitHub App JWT and requested an installation token before validating the webhook signature. An attacker can send a crafted webhook payload containing an installation ID and supply an attacker-controlled X-GitHub-Enterprise-Host header.
What can an attacker do with the exposed credential?
The attacker-controlled host can receive the locally signed GitHub App JWT. The attacker may then attempt to mint installation access tokens during the JWT validity window, limited by the relevant GitHub App installation and its permissions.