CVE-2024-53859
go-gh `auth.TokenForHost` violates GitHub host security boundary within a codespace
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.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- High
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
6.5
go-gh `auth.TokenForHost` violates GitHub host security boundary within a codespace
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.
- Record
CVE-2024-53859- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L - Weakness
- CWE-200
- Updated
- 2026-11-02
EUVDEUVD-2024-3396
6.5
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.
- Record
EUVD-2024-3396- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-55v3-xh23-96gh
6.5
`auth.TokenForHost` violates GitHub host security boundary when sourcing authentication token within a codespace
Summary
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.
Details
go-gh sources authentication tokens from different environment variables depending on the host involved:
GITHUB_TOKEN,GH_TOKENfor GitHub.com and ghe.comGITHUB_ENTERPRISE_TOKEN,GH_ENTERPRISE_TOKENfor GitHub Enterprise Server
Prior to 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 2.11.1, auth.TokenForHost will only source a token from the GITHUB_TOKEN environment variable for GitHub.com or ghe.com hosts.
Impact
Successful exploitation could send authentication token to an unintended host.
Remediation and mitigation
- Upgrade
go-ghto2.11.1 - Advise extension users to regenerate authentication tokens:
- Advise extension users to review their personal security log and any relevant audit logs for actions associated with their account or enterprise
- Record
GHSA-55v3-xh23-96gh- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L - Weakness
- CWE-200
- Updated
- 2026-11-02
NVD
6.5
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.
- Record
CVE-2024-53859- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-200
- Updated
- 2026-11-02
OSV
6.5
go-gh `auth.TokenForHost` violates GitHub host security boundary within a codespace
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.
- Record
CVE-2024-53859- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L - Weakness
- CWE-200
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2024-53859
7.5
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.
- Record
DEBIAN-CVE-2024-53859- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
Show 6 moreShow less
OSVGHSA-55v3-xh23-96gh
6.5
`auth.TokenForHost` violates GitHub host security boundary when sourcing authentication token within a codespace
Summary
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.
Details
go-gh sources authentication tokens from different environment variables depending on the host involved:
GITHUB_TOKEN,GH_TOKENfor GitHub.com and ghe.comGITHUB_ENTERPRISE_TOKEN,GH_ENTERPRISE_TOKENfor GitHub Enterprise Server
Prior to 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 2.11.1, auth.TokenForHost will only source a token from the GITHUB_TOKEN environment variable for GitHub.com or ghe.com hosts.
Impact
Successful exploitation could send authentication token to an unintended host.
Remediation and mitigation
- Upgrade
go-ghto2.11.1 - Advise extension users to regenerate authentication tokens:
- Advise extension users to review their personal security log and any relevant audit logs for actions associated with their account or enterprise
- Record
GHSA-55v3-xh23-96gh- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L - Weakness
- CWE-200
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2024-53859
6.5
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.
- Record
UBUNTU-CVE-2024-53859- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVAZL-53453 No score
CVE-2024-53859 affecting package gh for versions less than 2.62.0-5
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.
- Record
AZL-53453- Updated
- 2026-11-02
OSVGO-2024-3295 No score
Violation of GitHub host security boundary when sourcing authentication token within a codespace in github.com/cli/go-gh
Violation of GitHub host security boundary when sourcing authentication token within a codespace in github.com/cli/go-gh
- Record
GO-2024-3295- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:14599-1 No score
govulncheck-vulndb-0.0.20241213T205935-1.1 on GA media
These are all security issues fixed in the govulncheck-vulndb-0.0.20241213T205935-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:14599-1- Updated
- 2026-11-02
OSVUSN-7362-1 No score
golang-github-cli-go-gh-v2 vulnerability
It was discovered that go-gh incorrectly handled authentication tokens. An attacker could possibly use this issue to leak authentication tokens to the wrong host. (CVE-2024-53859)
- Record
USN-7362-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/cli/go-gh/v2Go |
through 2.11.0 | 2.11.1 |
github.com/cli/go-ghGo |
before 2.11.1 | 2.11.1 |
ghAzure Linux:3 |
before 2.62.0-5 | 2.62.0-5 |
golang-github-cli-go-gh-v2Debian:13 |
All versions, plus listed versions 2.6.0-2 |
None known |
golang-github-cli-go-gh-v2Debian:14 |
All versions, plus listed versions 2.6.0-2 |
None known |
github.com/cli/go-gh/v2Go |
before 2.11.1 | 2.11.1 |
github.com/cli/go-ghGo |
All versions | None known |
golang-github-cli-go-gh-v2Ubuntu:Pro:24.04:LTS |
before 2.6.0-1ubuntu0.24.04.1~esm1, plus listed versions 2.0.0-22.3.0-12.4.0+git20231120.d32c104-12.5.0-12.6.0-1 |
2.6.0-1ubuntu0.24.04.1~esm1 |
golang-github-cli-go-gh-v2Ubuntu:25.10 |
All versions, plus listed versions 2.6.0-2 |
None known |
golang-github-cli-go-gh-v2Ubuntu:26.10 |
All versions, plus listed versions 2.6.0-2 |
None known |
golang-github-cli-go-gh-v2Ubuntu:26.04:LTS |
All versions, plus listed versions 2.6.0-2 |
None known |
govulncheck-vulndbopenSUSE:Tumbleweed From an advisory covering 21 CVEs |
before 0.0.20241213T205935-1.1 | 0.0.20241213T205935-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-53859 is a medium vulnerability (CVSS 6.5) in Cli Go-gh, published November 27, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.55%, the 46th percentile. Fixed in github.com/cli/go-gh/v2 2.11.1.
References
github.com/cli/go-gh/security/advisories/GHSA-55v3-xh23-96gh
docs.github.com/en/apps/using-github-apps/reviewing-and-revoking-authorization-of-github-apps
docs.github.com/en/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log
docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/identifying-audit-log-events-performed-by-an-access-token
docs.github.com/en/enterprise-cloud@latest/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
github.com/cli/go-gh/blob/71770357e0cb12867d3e3e288854c0aa09d440b7/pkg/auth/auth.go
Show 31 moreShow less
nvd.nist.gov/vuln/detail/CVE-2024-53859
pkg.go.dev/vuln/GO-2024-3295
github.com/advisories/GHSA-55v3-xh23-96gh
github.com/CVEProject/cvelistV5/tree/main/cves/2024/53xxx/CVE-2024-53859.json
security-tracker.debian.org/tracker/CVE-2024-53859
github.com/cli/go-gh
ubuntu.com/security/CVE-2024-53859
cve.org/CVERecord?id=CVE-2024-53859
ubuntu.com/security/notices/USN-7362-1
lists.opensuse.org/archives/list/[email protected]/thread/QTUY324RV3FFZBHVIWDHRCIOPJHIJIN4
suse.com/security/cve/CVE-2020-10696
suse.com/security/cve/CVE-2020-8912
suse.com/security/cve/CVE-2022-31668
suse.com/security/cve/CVE-2023-26248
suse.com/security/cve/CVE-2023-3676
suse.com/security/cve/CVE-2023-3955
suse.com/security/cve/CVE-2024-12401
suse.com/security/cve/CVE-2024-37032
suse.com/security/cve/CVE-2024-44337
suse.com/security/cve/CVE-2024-45039
suse.com/security/cve/CVE-2024-45337
suse.com/security/cve/CVE-2024-45436
suse.com/security/cve/CVE-2024-46455
suse.com/security/cve/CVE-2024-46528
suse.com/security/cve/CVE-2024-53257
suse.com/security/cve/CVE-2024-53859
suse.com/security/cve/CVE-2024-55601
suse.com/security/cve/CVE-2024-55657
suse.com/security/cve/CVE-2024-55658
suse.com/security/cve/CVE-2024-55659
suse.com/security/cve/CVE-2024-55660