{"id":"CVE-2026-54167","kind":"vulnerability","aliases":["CVE-2026-54167","GHSA-f5f4-3hh4-f54m"],"related":[],"title":"Pipelines-as-Code GitHub App token request can be redirected via untrusted Enterprise Host header","description":"## Impact\n\nPipelines-as-Code installations using the GitHub App provider are vulnerable to GitHub App credential exfiltration through the webhook endpoint.\n\nAffected 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.\n\nAn 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.\n\nThe 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.\n\n## Patches\n\nThe 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.\n\n## Workarounds\n\nUntil 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.\n\nOperators 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.\n\n## Credits\n\nReported and fixed by the Pipelines-as-Code maintainers.","summary":"Pipelines-as-Code sent a GitHub App JWT to an API host taken from an attacker-controlled X-GitHub-Enterprise-Host header, before verifying the webhook signature. An attacker who can reach the webhook endpoint can leak the JWT and try to mint installation access tokens within its validity window.","severity":"high","cvss":8.2,"epss":0.00268,"exploited":false,"exploited_at":null,"products":[{"name":"github.com/openshift-pipelines/pipelines-as-code","fixed":["0.48.0"],"affected":">= 0.43.0, < 0.48.0","ecosystem":"go"},{"name":"github.com/openshift-pipelines/pipelines-as-code","fixed":["0.42.1"],"affected":">= 0.40.0, < 0.42.1","ecosystem":"go"},{"name":"github.com/openshift-pipelines/pipelines-as-code","fixed":["0.39.6"],"affected":">= 0.38.0, < 0.39.6","ecosystem":"go"},{"name":"github.com/openshift-pipelines/pipelines-as-code","fixed":["0.37.8"],"affected":"< 0.37.8","ecosystem":"go"}],"ecosystems":["go"],"tags":["cwe-345","github-app","kubernetes","openshift-pipelines","package","pipelines-as-code","tekton"],"not_affected_if":["non-github-app-provider","patched-version","webhook-restricted-to-trusted-sources"],"how_to_check":"- Check the installed version: `pipelines-as-code` controller version; affected if below `0.48.0`, `0.42.1` (for 0.40.0 to 0.42.0), `0.39.6` (for 0.38.0 to 0.39.5), or `0.37.8` (for earlier releases)\n- Confirm whether the GitHub App provider is in use in the Pipelines-as-Code configuration\n- Check ingress or proxy logs for requests to the webhook endpoint carrying an X-GitHub-Enterprise-Host header","fix":"- Upgrade Pipelines-as-Code to `0.48.0`, or `0.42.1`, `0.39.6`, or `0.37.8` on the matching release line\n- Until patched, strip or block X-GitHub-Enterprise-Host at the ingress or proxy; for GitHub.com installations reject requests with this header, for GitHub Enterprise Server allow only the expected hostname\n- Restrict the webhook endpoint to trusted Git provider sources where possible\n- If exploitation is suspected, rotate the GitHub App private key and review installation token activity","status":"open","published_at":"2026-08-20T18:36:30+00:00","first_seen_at":"2026-10-28T15:34:52+00:00","triaged_at":"2026-10-28T15:35:11+00:00","updated_at":"2026-10-28T15:35:11+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-28T15:35:11Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade Pipelines-as-Code to `0.48.0`, or `0.42.1`, `0.39.6`, or `0.37.8` on the matching release line\n- Until patched, strip or block X-GitHub-Enterprise-Host at the ingress or proxy; for GitHub.com installations reject requests with this header, for GitHub Enterprise Server allow only the expected hostname\n- Restrict the webhook endpoint to trusted Git provider sources where possible\n- If exploitation is suspected, rotate the GitHub App private key and review installation token activity","reach":"internet","title":"Pipelines-as-Code: GitHub App token request redirectable via Enterprise Host header","impact":"high","summary":"Pipelines-as-Code sent a GitHub App JWT to an API host taken from an attacker-controlled X-GitHub-Enterprise-Host header, before verifying the webhook signature. An attacker who can reach the webhook endpoint can leak the JWT and try to mint installation access tokens within its validity window.","category":"package","nicknames":[],"who_cares":["pipelines-as-code","openshift-pipelines","tekton","github-app","kubernetes"],"confidence":0.8,"needs_auth":"no","worst_case":"GitHub App JWT leaks; attacker may mint installation tokens","analyst_note":"","how_to_check":"- Check the installed version: `pipelines-as-code` controller version; affected if below `0.48.0`, `0.42.1` (for 0.40.0 to 0.42.0), `0.39.6` (for 0.38.0 to 0.39.5), or `0.37.8` (for earlier releases)\n- Confirm whether the GitHub App provider is in use in the Pipelines-as-Code configuration\n- Check ingress or proxy logs for requests to the webhook endpoint carrying an X-GitHub-Enterprise-Host header","needs_analyst":false,"not_affected_if":["patched-version","non-github-app-provider","webhook-restricted-to-trusted-sources"],"who_is_affected":"Teams running Pipelines-as-Code with the GitHub App provider, where the webhook endpoint is reachable from the internet or an untrusted network. The flaw sits in the token generation path for incoming GitHub webhook events that include an installation ID. Installations on other providers or with the webhook endpoint restricted to trusted sources are less exposed.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.000854,"input_tokens":4246,"output_tokens":858,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':18A,26A '-345':41B '-54167':19A,27A '/openshift-pipelines/pipelines-as-code':30A,33A,36A,39A '3hh4':23A 'accept':132C 'access':102B,172C,271C,436C 'activ':464C 'affect':130C 'allow':261C,426C 'also':290C,434C 'api':66B,145C,246C 'app':6A,44B,62B,117C,123C,149C,166C,237C,253C,269C,282C,299C,329C,455C,461C 'attack':72B,86B,194C,226C,258C,263C 'attacker-control':71B,225C,257C 'attempt':265C 'block':387C 'check':180C 'code':4A,53B,58B,112C,162C,202C,409C,474C 'configur':374C 'contain':156C,212C 'control':73B,227C,233C,259C 'cr':319C 'craft':208C 'credenti':124C 'credit':465C 'cve':17A,25A 'cwe':40B 'deploy':384C 'deriv':371C 'disclos':250C 'endpoint':92B,129C,204C,411C,440C 'enterpris':14A,77B,137C,144C,183C,221C,295C,337C,357C,368C,394C,423C,430C 'event':155C 'exfiltr':125C 'expect':429C 'exploit':308C,449C 'f54m':24A 'f5f4':22A 'fix':322C,468C 'flow':289C 'front':403C 'generat':151C,163C,231C,304C,331C 'ghsa':21A 'ghsa-f5f4-3hh4-f54m':20A 'git':443C 'github':5A,43B,61B,76B,116C,122C,136C,143C,148C,153C,165C,209C,220C,236C,252C,268C,281C,294C,298C,328C,336C,356C,393C,422C,454C,460C 'github-app':42B 'github.com':29A,32A,35A,38A,413C 'github.com/openshift-pipelines/pipelines-as-code':28A,31A,34A,37A 'header':16A,79B,140C,352C,396C,420C 'host':15A,67B,78B,138C,146C,184C,222C,228C,247C,296C,338C,358C,369C,395C 'hostnam':431C 'id':215C 'impact':108C 'includ':418C 'incom':287C,312C,360C,365C 'ingress':399C 'instal':101B,113C,171C,214C,270C,283C,300C,414C,425C,462C 'installation.id':158C 'instead':377C 'jwt':63B,96B,167C,238C,254C,275C 'key':457C 'kubernet':45B 'leak':94B 'local':239C 'lookup':301C 'maintain':475C 'match':185C,339C 'mint':100B,267C 'openshift':47B 'openshift-pipelin':46B 'oper':385C,432C 'packag':49B 'patch':320C,381C 'path':307C 'payload':192C,211C,346C 'permiss':285C 'pipelin':2A,48B,51B,56B,110C,160C,200C,407C,472C 'pipelines-as-cod':1A,50B,55B,109C,159C,199C,406C,471C 'possibl':447C 'privat':456C 'provid':118C,444C 'proxi':401C 'reach':89B,197C 'redirect':11A 'reject':415C 'releas':382C 'report':466C 'repositori':187C,318C,341C,375C 'request':8A,139C,169C,351C,363C,416C 'requir':309C 'restrict':435C 'review':459C 'rotat':452C 'secret':314C 'select':245C,354C 'send':206C,241C 'sent':59B 'server':424C 'servic':260C 'set':217C 'sign':191C,234C 'signatur':84B,178C,326C 'sourc':445C 'stop':348C 'strip':389C 'subject':278C 'suspect':451C 'taken':68B 'target':317C 'tekton':54B 'token':7A,103B,150C,173C,230C,272C,303C,330C,362C,463C 'tri':98B 'trust':291C,442C 'unexpect':390C 'untrust':13A 'url':188C,342C,376C 'use':114C,349C 'valid':106B,175C,276C,311C,323C 'verifi':81B,332C 'version':131C 'via':12A 'vulner':120C 'webhook':83B,91B,128C,154C,177C,203C,210C,288C,313C,325C,345C,361C,366C,410C,439C 'window':107B,277C 'within':104B,273C 'workaround':378C 'x':75B,135C,219C,293C,335C,392C 'x-github-enterprise-host':74B,134C,218C,292C,334C,391C","nicknames":[],"mitigations":[],"who_affected":"Teams running Pipelines-as-Code with the GitHub App provider, where the webhook endpoint is reachable from the internet or an untrusted network. The flaw sits in the token generation path for incoming GitHub webhook events that include an installation ID. Installations on other providers or with the webhook endpoint restricted to trusted sources are less exposed.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-08-20T18:36:30+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-f5f4-3hh4-f54m","url":"https://github.com/advisories/GHSA-f5f4-3hh4-f54m","severity":"high","published_at":"2026-08-20T18:36:30+00:00","modified_at":"2026-10-28T15:33:27+00:00","first_seen_at":"2026-10-28T15:34:52+00:00","fetched_at":"2026-10-28T18:13:44+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-54167","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54167","severity":null,"published_at":"2026-09-15T15:17:17+00:00","modified_at":"2026-09-30T17:43:24+00:00","first_seen_at":"2026-10-28T16:04:30+00:00","fetched_at":"2026-10-28T16:04:30+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}