{"id":"CVE-2022-39304","aliases":["EUVD-2022-7643","GHSA-h4q8-96p6-jcgr","GO-2022-1178"],"status":"published","title":"ghinstallation returns app JWT in error responses","description":"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.","severity":{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00393,"percentile":0.33802,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-209"],"published":"2022-12-19T22:48:32Z","modified":"2026-10-28T02:30:52Z","fixes":[{"ecosystem":"Go","package":"github.com/bradleyfalzon/ghinstallation","fixed_in":["2.0.0","1.1.2-0.20210308182858-d24f14f8be70"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/bradleyfalzon/ghinstallation","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/bradleyfalzon/ghinstallation","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/bradleyfalzon/ghinstallation","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.1.2-0.20210308182858-d24f14f8be70"}]}]}],"products":[{"vendor":"bradleyfalzon","product":"ghinstallation"},{"vendor":"ghinstallation_project","product":"ghinstallation"}],"references":[{"url":"https://github.com/bradleyfalzon/ghinstallation/security/advisories/GHSA-h4q8-96p6-jcgr","tags":["x_refsource_CONFIRM","x_transferred","Patch","Third Party Advisory","advisory","web"]},{"url":"https://github.com/bradleyfalzon/ghinstallation/commit/d24f14f8be70d94129d76026e8b0f4f9170c8c3e","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation","tags":["x_refsource_MISC","x_transferred","Technical Description","Third Party Advisory","web"]},{"url":"https://github.com/bradleyfalzon/ghinstallation/blob/24e56b3fb7669f209134a01eff731d7e2ef72a5c/transport.go#L172-L174","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39304","tags":["advisory"]},{"url":"https://securitylab.github.com/advisories/GHSL-2022-061_ghinstallation/"},{"url":"https://pkg.go.dev/vuln/GO-2022-1178","tags":["web"]},{"url":"https://github.com/advisories/GHSA-h4q8-96p6-jcgr"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/39xxx/CVE-2022-39304.json","tags":["advisory"]},{"url":"https://github.com/bradleyfalzon/ghinstallation","tags":["package"]},{"url":"https://securitylab.github.com/advisories/GHSL-2022-061_ghinstallation","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2022-39304","title":"ghinstallation returns app JWT in error responses","description":"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.\n","status":"published","published":"2022-12-20T19:52:28.024Z","modified":"2025-04-16T14:47:35.191Z","cvss":[{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L","level":"medium","assessor":"cna"}],"cwes":["CWE-209"],"updated_at":"2026-11-02T14:34:39.559326Z"}],"euvd":[{"id":"EUVD-2022-7643","description":"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.\n","status":"published","published":"2022-12-20T19:52:28Z","modified":"2025-04-16T14:47:35Z","cvss":[{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L","level":"medium"}],"updated_at":"2026-11-02T20:52:25.343198Z"}],"ghsa":[{"id":"GHSA-h4q8-96p6-jcgr","title":"ghinstallation returns app JWT in error responses","description":"### 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 \u003e= 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)\n","status":"published","published":"2022-12-19T22:48:32Z","modified":"2023-08-28T22:50:08Z","cvss":[{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L","level":"medium"}],"cwes":["CWE-209"],"updated_at":"2026-11-02T14:37:01.345964Z"}],"nvd":[{"id":"CVE-2022-39304","description":"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.\n","status":"published","published":"2022-12-20T20:15:10.043Z","modified":"2026-06-17T04:58:06.453Z","cvss":[{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L","level":"medium","assessor":"secondary"},{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-209"],"updated_at":"2026-11-02T14:07:34.031641Z"}],"osv":[{"id":"CVE-2022-39304","title":"ghinstallation returns app JWT in error responses","description":"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.\n","status":"published","published":"2022-12-20T19:52:28.024Z","modified":"2026-10-28T02:30:52.029829313Z","cvss":[{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L","level":"medium"}],"cwes":["CWE-209"],"updated_at":"2026-11-02T15:44:26.860704Z"},{"id":"GHSA-h4q8-96p6-jcgr","title":"ghinstallation returns app JWT in error responses","description":"### 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 \u003e= 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)\n","status":"published","published":"2022-12-19T22:48:32Z","modified":"2023-11-08T04:10:18.331336Z","cvss":[{"version":"3.1","score":5,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L","level":"medium"}],"cwes":["CWE-209"],"updated_at":"2026-11-02T15:46:48.546324Z"},{"id":"GO-2022-1178","title":"JWT leak in github.com/bradleyfalzon/ghinstallation","description":"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.","status":"published","published":"2022-12-22T21:01:01Z","modified":"2024-05-20T16:03:47Z","updated_at":"2026-11-02T15:47:00.918515Z"}]}}
