Every CVE Search/ Get API key

CVE-2022-39304

ghinstallation returns app JWT in error responses

5.0 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
High
Privileges needed
Low
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
None
Availability
Low

Exploit likelihood

0.39%Down 0.6 points since Dec 21, 2022
90%50%10%1%

What each source reports

CVE List Score used 5.0

ghinstallation returns app JWT in error responses

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.

Record
CVE-2022-39304
CVSS 3.1
5.0 MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L
Weakness
CWE-209
Updated
2026-11-02
EUVDEUVD-2022-7643 5.0

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.

Record
EUVD-2022-7643
CVSS 3.1
5.0 MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L
Updated
2026-11-02
GitHub AdvisoriesGHSA-h4q8-96p6-jcgr 5.0

ghinstallation returns app JWT in error responses

Impact

In ghinstallation v1, when the request to refresh an installation token failed, the HTTP request and response would be returned for debugging.

https://github.com/bradleyfalzon/ghinstallation/blob/24e56b3fb7669f209134a01eff731d7e2ef72a5c/transport.go#L172-L174

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?

For more information

If you have any questions or comments about this advisory:

Record
GHSA-h4q8-96p6-jcgr
CVSS 3.1
5.0 MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L
Weakness
CWE-209
Updated
2026-11-02
NVD 5.0

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.

Record
CVE-2022-39304
CVSS 3.1
5.0 MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L
CVSS 3.1
4.7 MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-209
Updated
2026-11-02
OSV 5.0

ghinstallation returns app JWT in error responses

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.

Record
CVE-2022-39304
CVSS 3.1
5.0 MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L
Weakness
CWE-209
Updated
2026-11-02
OSVGHSA-h4q8-96p6-jcgr 5.0

ghinstallation returns app JWT in error responses

Impact

In ghinstallation v1, when the request to refresh an installation token failed, the HTTP request and response would be returned for debugging.

https://github.com/bradleyfalzon/ghinstallation/blob/24e56b3fb7669f209134a01eff731d7e2ef72a5c/transport.go#L172-L174

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?

For more information

If you have any questions or comments about this advisory:

Record
GHSA-h4q8-96p6-jcgr
CVSS 3.1
5.0 MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L
Weakness
CWE-209
Updated
2026-11-02
OSVGO-2022-1178 No score

JWT leak in github.com/bradleyfalzon/ghinstallation

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.

Record
GO-2022-1178
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
github.com/bradleyfalzon/ghinstallation
Go
before 2.0.0
2.0.0
github.com/bradleyfalzon/ghinstallation
Go
before 1.1.2-0.20210308182858-d24f14f8be70
1.1.2-0.20210308182858-d24f14f8be70

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-39304 is a medium vulnerability (CVSS 5.0) in Bradleyfalzon Ghinstallation, published December 19, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.39%, the 33rd percentile. Fixed in github.com/bradleyfalzon/ghinstallation 2.0.0.

References

Show 4 moreShow less
MoveEnter Open