Vulnerability · Published Dec 20, 2022 · Assigned by GitHub_M
CVE-2022-39304ghinstallation returns app JWT in error responses
Medium 5.0
In plain English
A medium-severity security flaw in ghinstallation from bradleyfalzon. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 34% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/bradleyfalzon/ghinstallation | 2.0.0 | GHSA-h4q8-96p6-jcgr |
| Go | github.com/bradleyfalzon/ghinstallation | 1.1.2-0.20210308182858-d24f14f8be70 | GO-2022-1178 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| bradleyfalzon | ghinstallation | < 2.0.0 |
Weakness: CWE-209 · Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L
References
- https://github.com/bradleyfalzon/ghinstallation/security/advisories/GHSA-h4q8-96p6-jcgr x_refsource_CONFIRM
- https://github.com/bradleyfalzon/ghinstallation/commit/d24f14f8be70d94129d76026e8b0f4f9170c8c3e x_refsource_MISC
- https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation x_refsource_MISC
- https://github.com/bradleyfalzon/ghinstallation/blob/24e56b3fb7669f209134a01eff731d7e2ef72a5c/transport.go#L172-L174 x_refsource_MISC