{"id":"CVE-2022-39304","aliases":["CVE-2022-39304","GHSA-h4q8-96p6-jcgr","GO-2022-1178"],"related":[],"kind":"vulnerability","state":"published","title":"ghinstallation returns app JWT in error responses","summary":"ghinstallation provides transport, which implements http.RoundTripper to provide authentication as an installation for GitHub Apps. In ghinstallation version 1, when the request to refresh an installation token failed, the HTTP request and response would be returned for debugging. The request contained the bearer JWT for the App, and was returned back to clients. This token is short lived (10 minute maximum). This issue has been patched and is available in version 2.0.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"ghinstallation provides transport, which implements http.RoundTripper to provide authentication as an installation for GitHub Apps. In ghinstallation version 1, when the request to refresh an installation token failed, the HTTP request and response would be returned for debugging. The request contained the bearer JWT for the App, and was returned back to clients. This token is short lived (10 minute maximum). This issue has been patched and is available in version 2.0.0.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nIn ghinstallation v1, when the request to refresh an installation token failed, the HTTP request and response would be returned for debugging.\n\nhttps://github.com/bradleyfalzon/ghinstallation/blob/24e56b3fb7669f209134a01eff731d7e2ef72a5c/transport.go#L172-L174\n\nThe request contained the bearer JWT for the App, and was returned back to clients. This token is short lived (10 minute maximum).\n\n### Patches\n\n- This has already been patched in d24f14f8be70d94129d76026e8b0f4f9170c8c3e, and is available in releases >= v2.0.0.\n\n### References\n_Are there any links users can visit to find out more?_\n\n- See https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation for the App installation flow.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [ghinstallation](https://github.com/bradleyfalzon/ghinstallation)","format":"markdown","source":"ghsa"},{"lang":"en","text":"Errors returned by ghinstallation.Transport can include the JWT used for the failed operation. If the error is exposed to an untrusted party, this JWT could be extracted and used to authenticate further requests.","format":"markdown","source":"go"},{"lang":"es","text":"ghinstallation proporciona transporte, que implementa http.RoundTripper para proporcionar autenticación como una instalación para GitHub Apps. En la versión 1 de ghinstallation, cuando fallaba la solicitud para actualizar un token de instalación, la solicitud HTTP y la respuesta se devolvían para su depuración. La solicitud contenía el JWT portador de la aplicación y se devolvía a los clientes. Este token tiene una duración breve (máximo 10 minutos). Este problema ha sido solucionado y está disponible en la versión 2.0.0.","source":"nvd"}],"published":"2022-12-19T22:48:32.000Z","modified":"2026-06-17T04:58:06.453Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L","score":5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L","score":5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L","score":5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N","score":4.7,"rating":"MEDIUM"}],"cwes":["CWE-209"],"affected":[{"ranges":[{"version":"< 2.0.0","status":"affected"}],"vendor":"bradleyfalzon","product":"ghinstallation","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.0.0"}],"ecosystem":"Go","package":"github.com/bradleyfalzon/ghinstallation","purl":"pkg:golang/github.com/bradleyfalzon/ghinstallation","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.1.2-0.20210308182858-d24f14f8be70"}],"ecosystem":"Go","package":"github.com/bradleyfalzon/ghinstallation","purl":"pkg:golang/github.com/bradleyfalzon/ghinstallation","source":"go"},{"ranges":[{"status":"affected","fixed":"2.0.0"}],"vendor":"ghinstallation_project","product":"ghinstallation","cpe":"cpe:2.3:a:ghinstallation_project:ghinstallation:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/bradleyfalzon/ghinstallation/security/advisories/GHSA-h4q8-96p6-jcgr","tags":["advisory","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/bradleyfalzon/ghinstallation/commit/d24f14f8be70d94129d76026e8b0f4f9170c8c3e","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation","tags":["technical-description","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/bradleyfalzon/ghinstallation/blob/24e56b3fb7669f209134a01eff731d7e2ef72a5c/transport.go#L172-L174","tags":["exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39304","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/bradleyfalzon/ghinstallation","tags":["package"],"sources":["ghsa"]},{"url":"https://pkg.go.dev/vuln/GO-2022-1178","tags":["web"],"sources":["ghsa"]},{"url":"https://securitylab.github.com/advisories/GHSL-2022-061_ghinstallation","tags":["advisory"],"sources":["ghsa"]}],"credits":["@Miskerest"],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-04-16T14:46:54.959Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-39304","url":"https://www.cve.org/CVERecord?id=CVE-2022-39304","licence":"CVE Terms of Use","modified":"2025-04-16T14:47:35.191Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h4q8-96p6-jcgr","url":"https://github.com/advisories/GHSA-h4q8-96p6-jcgr","licence":"CC-BY-4.0","modified":"2023-11-08T04:10:18.331Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-1178","url":"https://pkg.go.dev/vuln/GO-2022-1178","licence":"CC-BY-4.0","modified":"2024-05-20T16:03:47.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-39304","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39304","licence":"Public domain","modified":"2026-06-17T04:58:06.453Z"}],"updatedAt":"2026-11-25T22:58:17.716Z","epss":{"score":0.00348,"percentile":0.20824,"date":"2026-11-30T12:00:22.000Z"}}