CVE-2022-39304
vulnerability analysis and mitigation

Overview

CVE-2022-39304 affects the ghinstallation package (versions < 2.0.0), a GitHub App authentication library written in Go. The vulnerability was discovered in July 2022 and publicly disclosed in December 2022. The issue exists in the token refresh mechanism of the package, which is used to provide authentication as an installation for GitHub Apps (GitHub Security Lab).

Technical details

The vulnerability occurs when an error is encountered during token renewal in the ghinstallation package. When the request to refresh an installation token fails, the HTTP request and response would be returned for debugging purposes, which included the bearer JWT (JSON Web Token) for the GitHub App. This token, although short-lived with a 10-minute maximum lifetime, could be exposed in error messages (GitHub Advisory). The vulnerability has been assigned a CVSS v3.1 score of 5.0 (Moderate) with the vector string CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:L (FortiGuard Labs).

Impact

The exposure of the bearer JWT token could potentially lead to unauthorized access and hijacking of the GitHub App. Even though the token is short-lived (10 minutes maximum), it could provide an attacker with temporary but significant access to the app's resources (GitHub Security Lab).

Mitigation and workarounds

The vulnerability has been patched in version 2.0.0 of the ghinstallation package. Users are advised to upgrade to version 2.0.0 or later to mitigate this security issue. The fix was implemented in commit d24f14f, which modified the error message to remove sensitive information (FortiGuard Labs).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management