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.

Published: 2024-11-27 Last update: 2025-09-22 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2024-53859 is rated Moderate Risk (40.5/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.52%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2024-53859

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.06% 0.52% +0.47%
2 2026-04-18 0.04% 0.06% +0.01%
3 2026-01-05 0.04%

Full EPSS history (9 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2024-53859

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
6.5 3.1 MEDIUM
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.
1.0 5.5 [email protected]
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:N)
Service keeps running; no real outage angle.
3.9 3.6 [email protected]

Weakness enumeration for CVE-2024-53859

GitHub Security Advisory for CVE-2024-53859

GHSA-55v3-xh23-96gh · Severity: medium · Ecosystem: go — `auth.TokenForHost` violates GitHub host security boundary when sourcing authentication token within a codespace

OS Trackers for CVE-2024-53859

vendor priority summary link
debian not yet assigned CVE-2024-53859 not yet assigned priority: Debian including 1 source packages (golang-github-cli-go-gh-v2), 3 status rows across 3 suites (forky, sid, trixie): open 3. https://security-tracker.debian.org/tracker/CVE-2024-53859
ubuntu medium CVE-2024-53859 medium priority: Ubuntu including 1 source packages (golang-github-cli-go-gh-v2), 7 status rows across 7 suites (focal, jammy, noble, oracular, plucky, questing, upstream): DNE 2, needs-triage 2, released 2, ignored 1. https://ubuntu.com/security/CVE-2024-53859

Affected software / configurations for CVE-2024-53859

Vendor Product Version Raw CPE
cli go-gh < 2.11.1 cpe:2.3:a:cli:go-gh:*:*:*:*:*:*:*:*

References for CVE-2024-53859

URL Tags
https://docs.github.com/en/apps/using-github-apps/reviewing-and-revoking-authorization-of-github-apps#reviewing-your-authorized-github-apps Technical Description
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log Technical Description
https://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 Technical Description
https://docs.github.com/en/enterprise-cloud@latest/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens Technical Description
https://github.com/cli/go-gh/blob/71770357e0cb12867d3e3e288854c0aa09d440b7/pkg/auth/auth.go#L73-L77 Product
https://github.com/cli/go-gh/security/advisories/GHSA-55v3-xh23-96gh Mitigation Vendor Advisory
cvelogic Threat Intelligence