{"answers":{"affected":"3 open source packages ship an affected version, including github.com/bradleyfalzon/ghinstallation. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-39304 in the wild and no public exploit code.","fix":"Upgrade github.com/bradleyfalzon/ghinstallation to a fixed version for your release line: 1.1.2-0.20210308182858-d24f14f8be70 or 2.0.0.","what":"CVE-2022-39304 is a medium-severity vulnerability in bradleyfalzon ghinstallation, published on 20 Dec 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2022-39304 and fix it if it is affected.\n\nWhat it is: CVE-2022-39304 is a medium-severity vulnerability in bradleyfalzon ghinstallation, published on 20 Dec 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2022-39304 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/bradleyfalzon/ghinstallation (Go): affected all versions; fixed in 1.1.2-0.20210308182858-d24f14f8be70\n- github.com/bradleyfalzon/ghinstallation (Go): affected all versions; fixed in 2.0.0\n- github.com/bradleyfalzon/ghinstallation (Go): affected all versions; fixed in 2.0.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-39304/ (Markdown: https://insights.sbomify.com/CVE-2022-39304/index.md)","id":"CVE-2022-39304","markdown":"https://insights.sbomify.com/CVE-2022-39304/index.md","name":"CVE-2022-39304","record":{"aliases":["GHSA-h4q8-96p6-jcgr","GO-2022-1178"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Go GitHub App library","requires_auth":"low_privilege","summary":"An attacker can obtain short-lived GitHub App JWTs from error responses in the ghinstallation Go library, potentially allowing unauthorized API access.","user_interaction":"required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"ghinstallation","vendor":"ghinstallation_project"}],"cvss":{"score":5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L","version":"3.1"},"cwes":[{"id":"CWE-209","name":"Generation of Error Message Containing Sensitive Information"}],"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.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"ghinstallation returns app JWT in error responses","id":"CVE-2022-39304","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"information_disclosure","year":"2022"},"n_packages":3,"n_references":4,"next":{"headline":"Gin-vue-admin vulnerable to Unrestricted Upload of File with Dangerous Type","id":"CVE-2022-39305"},"packages":[{"ecosystem":"Go","fixed":["1.1.2-0.20210308182858-d24f14f8be70"],"introduced":["0"],"last_affected":[],"package":"github.com/bradleyfalzon/ghinstallation","purl":"pkg:golang/github.com/bradleyfalzon/ghinstallation","source":"GO-2022-1178"},{"ecosystem":"Go","fixed":["2.0.0"],"introduced":["0"],"last_affected":[],"package":"github.com/bradleyfalzon/ghinstallation","purl":null,"source":"GHSA-h4q8-96p6-jcgr"},{"ecosystem":"Go","fixed":["2.0.0"],"introduced":["0"],"last_affected":[],"package":"github.com/bradleyfalzon/ghinstallation","purl":"pkg:golang/github.com/bradleyfalzon/ghinstallation","source":"GHSA-h4q8-96p6-jcgr"}],"prev":{"headline":"Ree6 vulnerable to SQL Injection","id":"CVE-2022-39303"},"products":["ghinstallation"],"published":"2022-12-20","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-16","vendors":["bradleyfalzon"]},"summary":"An attacker can obtain short-lived GitHub App JWTs from error responses in the ghinstallation Go library, potentially allowing unauthorized API access.","url":"https://insights.sbomify.com/CVE-2022-39304/"}