CVE-2022-39304: ghinstallation returns app JWT in error responses
5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.08079%
CWE
Published
12/19/2022
Updated
8/28/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/bradleyfalzon/ghinstallation | go | < 2.0.0 | 2.0.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from error handling in the refreshToken method where fmt.Errorf was used with verbose request/response details. The pre-patch line (return fmt.Errorf("request %+v received non 2xx response status %q with body %+v and TLS %+v", ...)) included the HTTP request object containing the JWT in headers. The commit d24f14f specifically modified this error formatting to remove sensitive request details, confirming this function as the vulnerability source. The Transport.refreshToken function is directly responsible for handling authentication token refreshes and error reporting, making it the clear entry point for the sensitive data leak.