CVE-2024-53859 json
go-gh `auth.TokenForHost` violates GitHub host security boundary within a codespace
published 2024-11-27 23 mo ago modified 2026-09-10 1 mo ago also GHSA-55v3-xh23-96gh , GO-2024-3295 , EUVD-2024-3396
- cvss
- 6.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 46%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- go github.com/cli/go-gh/v2 2.11.1
- github go-gh 2.11.1
- golang-github-cli-go-gh-v2 Ubuntu Pro 24.04 LTS 2.6.0-1ubuntu0.24.04.1~esm1
ubuntu advisories UBUNTU-CVE-2024-53859
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- govulncheck-vulndb openSUSE Tumbleweed 0.0.20241213T205935-1.1
opensuse advisories openSUSE-SU-2024:14599-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-53859 updated cvss 6.5
go-gh: go-gh `auth.TokenForHost` violates GitHub host security boundary within a codespace
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 23 mo ago
Exploit prediction
0.55% chance of exploitation in the next 30 days, higher than 46% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.5 | CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 3.1 | 6.5 | CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/cli/go-gh/v2 | <2.11.1 |
2.11.1 |
| go | github.com/cli/go-gh | all versions |
no fix listed |
Affected products
- cli go-gh
- github go-gh
Classification
- Weakness
-
- CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
References
-
github.com
/cli/go-gh/security/advisories/GHSA-55v3-xh23-96gh
web, mitigation, vendor-advisory, advisory
-
docs.github.com
/en/apps/using-github-apps/reviewing-and-revoking-authorization-of-github-apps#reviewing-your-authorized-githu
web, technical-description
-
docs.github.com
/en/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log
web, technical-description
-
docs.github.com
/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterpr
web, technical-description
-
docs.github.com
/en/enterprise-cloud@latest/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-
web, technical-description
-
github.com
/cli/go-gh/blob/71770357e0cb12867d3e3e288854c0aa09d440b7/pkg/auth/auth.go#L73-L77
web, product
-
nvd.nist.gov
/vuln/detail/CVE-2024-53859
advisory
-
github.com
/cli/go-gh
package
-
pkg.go.dev
/vuln/GO-2024-3295
web
Sources
- CVE List CVE-2024-53859
- GitHub Advisory GHSA-55v3-xh23-96gh
- NVD CVE-2024-53859
- OSV GO-2024-3295
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.