Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2024-53859

MEDIUM 6.5EPSS 53%

go-gh `auth.TokenForHost` violates GitHub host security boundary within a codespace

Also known as GHSA-55v3-xh23-96gh, GO-2024-3295

Mitigation

  • Upgrade github.com/cli/go-gh/v2 to 2.11.1 or later.

Who should check

  • Projects that depend on Go package github.com/cli/go-gh/v2 (< 2.11.1)
  • Projects that depend on Go package github.com/cli/go-gh
  • Anyone running cli go-gh < 2.11.1

Vulnerability facts

Affected
github.com/cli/go-gh/v2 < 2.11.1; github.com/cli/go-gh
Fixed in
2.11.1
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
6.5 (v3.1, CNA)CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Local
  • Attack complexity: High
  • Privileges required: None
  • User interaction: Required
  • Scope: Unchanged
  • Confidentiality impact: High
  • Integrity impact: High
  • Availability impact: Low
EPSS
0.79% chance of exploitation in 30 days (percentile 53, 2026-11-26)
CWE
CWE-200
Published
Modified

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.

Affected and fixed versions

Package / productAffectedFixedSource
Go github.com/cli/go-gh/v2< 2.11.12.11.1osv
Go github.com/cli/go-gh——osv
cli go-gh< 2.11.1—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2024-53859. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-53859.md
Affected: github.com/cli/go-gh/v2 < 2.11.1; github.com/cli/go-gh
Fixed in: 2.11.1

Steps:
1. Search this machine and project for github.com/cli/go-gh/v2 (Go), github.com/cli/go-gh (Go), cli go-gh: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2024-53859 being exploited?

There is no confirmed exploitation: CVE-2024-53859 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.79% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2024-53859?

Medium: CVSS 6.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

Which versions are affected by CVE-2024-53859?

github.com/cli/go-gh/v2 < 2.11.1; github.com/cli/go-gh.

Is there a fix for CVE-2024-53859?

Yes. Fixed in 2.11.1. Upgrade github.com/cli/go-gh/v2 to 2.11.1 or later.

How do I check if I'm affected by CVE-2024-53859?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors