GHSA-f5f4-3hh4-f54m: High severity go/github.com/openshift-pipelines/pipelines-as-code vulnerability

Published Aug 20, 2026
·
Updated

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

4 affected componentsFixes available
go/github.com/openshift-pipelines/pipelines-as-code<0.37.8
0.37.8
go/github.com/openshift-pipelines/pipelines-as-code>=0.38.0<0.39.6
0.39.6
go/github.com/openshift-pipelines/pipelines-as-code>=0.40.0<0.42.1
0.42.1
go/github.com/openshift-pipelines/pipelines-as-code>=0.43.0<0.48.0
0.48.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/openshift-pipelines/pipelines-as-code to a version that resolves this vulnerability.

    Fixed in 0.37.8
  2. Upgrade

    Upgrade go/github.com/openshift-pipelines/pipelines-as-code to a version that resolves this vulnerability.

    Fixed in 0.39.6
  3. Upgrade

    Upgrade go/github.com/openshift-pipelines/pipelines-as-code to a version that resolves this vulnerability.

    Fixed in 0.42.1
  4. Upgrade

    Upgrade go/github.com/openshift-pipelines/pipelines-as-code to a version that resolves this vulnerability.

    Fixed in 0.48.0
  5. Upgrade

    Upgrade Pipelines-as-Code to a version that resolves this vulnerability.

    Fixed in v0.48.0
  6. Configuration

    At the ingress or proxy in front of the Pipelines-as-Code webhook endpoint, block or strip unexpected `X-GitHub-Enterprise-Host` headers until a patched release is deployed.

    Pipelines-as-Code webhook endpoint (ingress/proxy in front of it) X-GitHub-Enterprise-Host header handling = block or strip unexpected header values
  7. Configuration

    For GitHub Enterprise Server installations, allow only the expected Enterprise hostname.

    GitHub Enterprise Server integrations (Pipelines-as-Code / GitHub App handling) accepted X-GitHub-Enterprise-Host = only expected Enterprise hostname
  8. Configuration

    For GitHub.com installations, reject requests that include the `X-GitHub-Enterprise-Host` request header.

    GitHub.com integrations (Pipelines-as-Code / GitHub App handling) X-GitHub-Enterprise-Host header = reject requests that include this header
  9. Compensating control

    Restrict access to the Pipelines-as-Code webhook endpoint to trusted Git provider sources where possible.

  10. Operational

    If exploitation is suspected, rotate the GitHub App private key and review GitHub App installation token activity.

Event History

Aug 20, 2026
Advisory Published
via GitHub·06:36 PM
Data Sourced
via GitHub·06:36 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed?

Pipelines-as-Code installations using the GitHub App provider are exposed if an attacker can reach the Pipelines-as-Code webhook endpoint. The issue applies to webhook events containing an installation.id.

2

Does an attacker need GitHub credentials or a valid webhook signature?

No. The affected flow generated a GitHub App JWT and requested an installation token before validating the webhook signature. An unauthenticated attacker could submit a crafted webhook payload with an installation ID and an attacker-controlled X-GitHub-Enterprise-Host header.

3

What can an attacker obtain through exploitation?

The attacker-controlled host can receive the locally signed GitHub App JWT. They may then attempt to mint GitHub App installation access tokens during the JWT validity window, limited by the affected GitHub App installation and its permissions.

4

What is the immediate mitigation if patching is not available?

Restrict network access to the Pipelines-as-Code webhook endpoint so untrusted attackers cannot reach it. This directly prevents the crafted webhook request required for credential exfiltration.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203