{"id":"CVE-2022-39304","aliases":["GHSA-h4q8-96p6-jcgr","GO-2022-1178"],"summary":"ghinstallation returns app JWT in error responses","published_at":"2022-07-21T00:00:00Z","modified_at":"2025-04-16T14:47:35.191Z","products":[],"rating":{"severity":"medium","score":5,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L","attack_path":"local","user_interaction":true,"malicious":false,"red_hat":"Moderate","vendor_ratings":[{"source":"Red Hat","rating":"Moderate"}]},"fix_available":false,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.003930000122636557,"percentile":0.34213998913764954,"date":"2026-11-19T00:00:00Z"},"priority":4,"details":"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_stack":[],"affected_other":[{"ecosystem":"CVE","package":"bradleyfalzon/ghinstallation","versions":["< 2.0.0"],"provider":"cvelistv5","source":"CVE-2022-39304","relation":"self"},{"ecosystem":"Go","package":"github.com/bradleyfalzon/ghinstallation","purl":"pkg:golang/github.com/bradleyfalzon/ghinstallation","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}],"fixed":["2.0.0"],"provider":"osv","source":"GHSA-h4q8-96p6-jcgr","relation":"self"},{"ecosystem":"Go","package":"github.com/bradleyfalzon/ghinstallation","purl":"pkg:golang/github.com/bradleyfalzon/ghinstallation","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.1.2-0.20210308182858-d24f14f8be70"}]}],"fixed":["1.1.2-0.20210308182858-d24f14f8be70"],"provider":"osv","source":"GO-2022-1178","relation":"self"},{"ecosystem":"NVD","package":"ghinstallation_project:ghinstallation","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}],"fixed":["2.0.0"],"provider":"nvd","source":"CVE-2022-39304","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","cpe":"cpe:/a:redhat:acm:2","status":"not_affected","packages":["rhacm2/multicluster-operators-subscription-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2022-39304"},{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 3","cpe":"cpe:/a:redhat:advanced_cluster_security:3","status":"not_affected","packages":["advanced-cluster-security/rhacs-main-rhel8","advanced-cluster-security/rhacs-scanner-rhel8"],"package_count":2,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2022-39304"},{"vendor":"Red Hat","product":"Red Hat OpenShift GitOps","cpe":"cpe:/a:redhat:openshift_gitops:1","status":"affected","packages":["openshift-gitops-1/applicationset-rhel8","openshift-gitops-1/argocd-rhel8"],"package_count":2,"fixed":[],"advisories":[],"note":"Affected","provider":"redhat-vex","source":"CVE-2022-39304"},{"vendor":"Red Hat","product":"Red Hat OpenShift GitOps","cpe":"cpe:/a:redhat:openshift_gitops:1","status":"not_affected","packages":["openshift-gitops-1/gitops-rhel8","openshift-gitops-1/gitops-rhel8-operator"],"package_count":2,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2022-39304"}],"records":[{"provider":"cvelistv5","source_id":"CVE-2022-39304","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2022-39304","license":"CC-BY-4.0","published_at":"2022-12-20T19:52:28.024Z","modified_at":"2025-04-16T14:47:35.191Z","summary":"ghinstallation returns app JWT in error responses","details":"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.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L","source":"CVE-2022-39304"}],"affected":[{"ecosystem":"CVE","package":"bradleyfalzon/ghinstallation","versions":["< 2.0.0"],"provider":"cvelistv5","source":"CVE-2022-39304","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/bradleyfalzon/ghinstallation/security/advisories/GHSA-h4q8-96p6-jcgr"},{"type":"WEB","url":"https://github.com/bradleyfalzon/ghinstallation/commit/d24f14f8be70d94129d76026e8b0f4f9170c8c3e"},{"type":"WEB","url":"https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation"},{"type":"WEB","url":"https://github.com/bradleyfalzon/ghinstallation/blob/24e56b3fb7669f209134a01eff731d7e2ef72a5c/transport.go#L172-L174"}]},{"provider":"nvd","source_id":"CVE-2022-39304","relation":"self","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39304","severity":[],"affected":[{"ecosystem":"NVD","package":"ghinstallation_project:ghinstallation","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}],"fixed":["2.0.0"],"provider":"nvd","source":"CVE-2022-39304","relation":"self"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"GHSA-h4q8-96p6-jcgr","relation":"self","url":"https://osv.dev/vulnerability/GHSA-h4q8-96p6-jcgr","license":"CC-BY-4.0","published_at":"2022-12-19T22:48:32Z","modified_at":"2023-11-08T04:10:18.331336Z","summary":"ghinstallation returns app JWT in error responses","details":"### Impact\n\nIn ghinstallation v1, when the request to refresh an installation token failed, the HTTP request and response would be returned for debugging.\n\nhttps://github.com/bradleyfalzon/ghinstallation/blob/24e56b3fb7669f209134a01eff731d7e2ef72a5c/transport.go#L172-L174\n\nThe request contained the bearer JWT for the App, and was returned back to clients. This token is short lived (10 minute maximum).\n\n### Patches\n\n- This has already been patched in d24f14f8be70d94129d76026e8b0f4f9170c8c3e, and is available in releases >= v2.0.0.\n\n### References\n_Are there any links users can visit to find out more?_\n\n- See https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation for the App installation flow.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [ghinstallation](https://github.com/bradleyfalzon/ghinstallation)","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L","source":"GHSA-h4q8-96p6-jcgr"}],"affected":[{"ecosystem":"Go","package":"github.com/bradleyfalzon/ghinstallation","purl":"pkg:golang/github.com/bradleyfalzon/ghinstallation","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.0"}]}],"fixed":["2.0.0"],"provider":"osv","source":"GHSA-h4q8-96p6-jcgr","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/bradleyfalzon/ghinstallation/security/advisories/GHSA-h4q8-96p6-jcgr"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39304"},{"type":"WEB","url":"https://github.com/bradleyfalzon/ghinstallation/commit/d24f14f8be70d94129d76026e8b0f4f9170c8c3e"},{"type":"WEB","url":"https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation"},{"type":"PACKAGE","url":"https://github.com/bradleyfalzon/ghinstallation"},{"type":"WEB","url":"https://github.com/bradleyfalzon/ghinstallation/blob/24e56b3fb7669f209134a01eff731d7e2ef72a5c/transport.go#L172-L174"},{"type":"WEB","url":"https://pkg.go.dev/vuln/GO-2022-1178"},{"type":"ADVISORY","url":"https://securitylab.github.com/advisories/GHSL-2022-061_ghinstallation"}]},{"provider":"osv","source_id":"GO-2022-1178","relation":"self","url":"https://osv.dev/vulnerability/GO-2022-1178","license":"CC-BY-4.0","published_at":"2022-12-22T21:01:01Z","modified_at":"2024-05-20T16:03:47Z","summary":"JWT leak in github.com/bradleyfalzon/ghinstallation","details":"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.","severity":[],"affected":[{"ecosystem":"Go","package":"github.com/bradleyfalzon/ghinstallation","purl":"pkg:golang/github.com/bradleyfalzon/ghinstallation","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.1.2-0.20210308182858-d24f14f8be70"}]}],"fixed":["1.1.2-0.20210308182858-d24f14f8be70"],"provider":"osv","source":"GO-2022-1178","relation":"self"}],"product_status":[],"references":[{"type":"ADVISORY","url":"https://github.com/bradleyfalzon/ghinstallation/security/advisories/GHSA-h4q8-96p6-jcgr"},{"type":"FIX","url":"https://github.com/bradleyfalzon/ghinstallation/commit/d24f14f8be70d94129d76026e8b0f4f9170c8c3e"},{"type":"WEB","url":"https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation"}]},{"provider":"redhat-vex","source_id":"CVE-2022-39304","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2022-39304","license":"CC-BY-4.0","published_at":"2022-07-21T00:00:00Z","modified_at":"2024-06-08T08:28:17Z","summary":"ghinstallation: Leak of bearer JWT from http.RoundTripper response","details":"A flaw was found in ghinstallation. When a request to refresh an installation token fails, the HTTP request and response are returned for debugging. The returned request contains the short-lived (10-min maximum) bearer JWT for the app and is returned back to clients.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L","source":"CVE-2022-39304"},{"type":"Red Hat","score":"Moderate","source":"CVE-2022-39304"}],"affected":[],"product_status":[{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","cpe":"cpe:/a:redhat:acm:2","status":"not_affected","packages":["rhacm2/multicluster-operators-subscription-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2022-39304"},{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 3","cpe":"cpe:/a:redhat:advanced_cluster_security:3","status":"not_affected","packages":["advanced-cluster-security/rhacs-main-rhel8","advanced-cluster-security/rhacs-scanner-rhel8"],"package_count":2,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2022-39304"},{"vendor":"Red Hat","product":"Red Hat OpenShift GitOps","cpe":"cpe:/a:redhat:openshift_gitops:1","status":"affected","packages":["openshift-gitops-1/applicationset-rhel8","openshift-gitops-1/argocd-rhel8"],"package_count":2,"fixed":[],"advisories":[],"note":"Affected","provider":"redhat-vex","source":"CVE-2022-39304"},{"vendor":"Red Hat","product":"Red Hat OpenShift GitOps","cpe":"cpe:/a:redhat:openshift_gitops:1","status":"not_affected","packages":["openshift-gitops-1/gitops-rhel8","openshift-gitops-1/gitops-rhel8-operator"],"package_count":2,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2022-39304"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2022/cve-2022-39304.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2022-39304"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2155942"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2022-39304"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39304"},{"type":"WEB","url":"https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation"},{"type":"WEB","url":"https://github.com/bradleyfalzon/ghinstallation/blob/24e56b3fb7669f209134a01eff731d7e2ef72a5c/transport.go#L172-L174"},{"type":"WEB","url":"https://github.com/bradleyfalzon/ghinstallation/commit/d24f14f8be70d94129d76026e8b0f4f9170c8c3e"},{"type":"WEB","url":"https://github.com/bradleyfalzon/ghinstallation/security/advisories/GHSA-h4q8-96p6-jcgr"}]}],"references":[{"type":"WEB","url":"https://github.com/bradleyfalzon/ghinstallation/security/advisories/GHSA-h4q8-96p6-jcgr"},{"type":"WEB","url":"https://github.com/bradleyfalzon/ghinstallation/commit/d24f14f8be70d94129d76026e8b0f4f9170c8c3e"},{"type":"WEB","url":"https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation"},{"type":"WEB","url":"https://github.com/bradleyfalzon/ghinstallation/blob/24e56b3fb7669f209134a01eff731d7e2ef72a5c/transport.go#L172-L174"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39304"},{"type":"PACKAGE","url":"https://github.com/bradleyfalzon/ghinstallation"},{"type":"WEB","url":"https://pkg.go.dev/vuln/GO-2022-1178"},{"type":"ADVISORY","url":"https://securitylab.github.com/advisories/GHSL-2022-061_ghinstallation"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2022/cve-2022-39304.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2022-39304"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2155942"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2022-39304"}],"sources":[{"provider":"cvelistv5","source_id":"CVE-2022-39304","url":"https://www.cve.org/CVERecord?id=CVE-2022-39304","license":"CC-BY-4.0","modified_at":"2025-04-16T14:47:35.191Z","relation":"self"},{"provider":"nvd","source_id":"CVE-2022-39304","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39304","relation":"self"},{"provider":"osv","source_id":"GHSA-h4q8-96p6-jcgr","url":"https://osv.dev/vulnerability/GHSA-h4q8-96p6-jcgr","license":"CC-BY-4.0","modified_at":"2023-11-08T04:10:18.331336Z","relation":"self"},{"provider":"osv","source_id":"GO-2022-1178","url":"https://osv.dev/vulnerability/GO-2022-1178","license":"CC-BY-4.0","modified_at":"2024-05-20T16:03:47Z","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2022-39304","url":"https://access.redhat.com/security/cve/CVE-2022-39304","license":"CC-BY-4.0","modified_at":"2024-06-08T08:28:17Z","relation":"self"}]}
