5.0medium
ghinstallation returns app JWT in error responses
- Severity
- 5.0medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.35% (higher than 21% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-h4q8-96p6-jcgrGO-2022-1178
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| bradleyfalzon ghinstallation | < 2.0.0 | CVE List |
| github.com/bradleyfalzon/ghinstallation (Go) | before 2.0.0, before 1.1.2-0.20210308182858-d24f14f8be70 | GitHub Advisory Database, Go Vulnerability Database |
| ghinstallation_project ghinstallation | before 2.0.0 | NVD |
All scores
| GitHub_M | 5.0medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L |
| GitHub | 5.0medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L |
| NVD | 4.7medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
Impact
In ghinstallation v1, 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).
Patches
- This has already been patched in d24f14f8be70d94129d76026e8b0f4f9170c8c3e, and is available in releases >= v2.0.0.
References
Are there any links users can visit to find out more?
- See https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation for the App installation flow.
For more information
If you have any questions or comments about this advisory:
- Open an issue in ghinstallation
Go Vulnerability Database
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.
NVD (es)
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.
References
| https://github.com/bradleyfalzon/ghinstallation/security/advisories/GHSA-h4q8-96p6-jcgr | advisory, patch, third-party-advisory, web | |
| https://github.com/bradleyfalzon/ghinstallation/commit/d24f14f8be70d94129d76026e8b0f4f9170c8c3e | fix, patch, third-party-advisory, web | |
| https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation | technical-description, third-party-advisory, web | |
| https://github.com/bradleyfalzon/ghinstallation/blob/24e56b3fb7669f209134a01eff731d7e2ef72a5c/transport.go#L172-L174 | exploit, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-39304 | advisory | |
| https://github.com/bradleyfalzon/ghinstallation | package | |
| https://pkg.go.dev/vuln/GO-2022-1178 | web | |
| https://securitylab.github.com/advisories/GHSL-2022-061_ghinstallation | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-39304 changed 2025-04-16 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-h4q8-96p6-jcgr changed 2023-11-08 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2022-1178 changed 2024-05-20 | CC-BY-4.0 |
| NVD | CVE-2022-39304 changed 2026-06-17 | Public domain |