CVE-2024-53859: go-gh - Authentication Token Leak
- Cve: CVE-2024-53859
- Name: go-gh - Authentication Token Leak
- Description: go-gh is a Go module for interacting with the `gh` utility and the GitHub API from the command line. A security vulnerability has been identified in `go-gh` that could leak authentication tokens intended for GitHub hosts to non-GitHub hosts when within a codespace. `go-gh` sources authentication tokens from different environment variables depending on the host involved: 1. `GITHUB_TOKEN`, `GH_TOKEN` for GitHub.com and ghe.com and 2. `GITHUB_ENTERPRISE_TOKEN`, `GH_ENTERPRISE_TOKEN` for GitHub Enterprise Server. Prior to version `2.11.1`, `auth.TokenForHost` could source a token from the `GITHUB_TOKEN` environment variable for a host other than GitHub.com or ghe.com when within a codespace. In version `2.11.1`, `auth.TokenForHost` will only source a token from the `GITHUB_TOKEN` environment variable for GitHub.com or ghe.com hosts. Successful exploitation could send authentication token to an unintended host. This issue has been addressed in version 2.11.1 and all users are advised to upgrade. Users are also advised to regenerate authentication tokens and to review their personal security log and any relevant audit logs for actions associated with their account or enterprise.
- Impact: Attackers can obtain authentication tokens and impersonate users or access private repositories, leading to potential account compromise.
- Remediation: Upgrade to version 2.11.1 or later, regenerate tokens, and review security logs.
- Vulnerability impact: information_disclosure
- Requirement type: user_interaction
- Requirements: User needs to be within a codespace using affected go-gh version
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 7.5
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Epss score: 0.00548
- Epss percentile: 0.46539
- Assignee: [email protected]
- Published at: 2024-11-27T22:15:05Z
- Age in days: 727
- Modified at: 2026-06-17T08:09:25Z
- Patch available: yes
- References total: 6
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-53859
- Nvd status: analyzed
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: vulnerability type, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-200 | Exposure of Sensitive Information to an Unauthorized Actor |
| NVD-CWE-noinfo | — |
References
Same in every row:
- Source: nvd
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| cli:go-gh | < 2.11.1 | no | nvd | /v1/products/cli/go-gh |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| cli/go-gh | package, security_advisory | yes | /v1/repositories/cli/go-gh |
Index
- Repositories: 3
- Packages: 1
- Checked, none or zero: repositories high signal
Exploitation
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts