7.5

CVE-2024-53859: go-gh `auth.TokenForHost` violates GitHub host security boundary within a codespace

Analyzed
AliasesUBUNTU-CVE-2024-53859USN-7362-1DEBIAN-CVE-2024-53859
Published 27-11-2024Last modified 03-12-2024

Vulnerability summary

CVE-2024-53859 is a high (CVSS 7.5) vulnerability in cli go-gh. EPSS estimates a 0.55% chance of exploitation in the next 30 days, higher than 47.3% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 6.5, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
7.5/10
010
High · v3.1 (NVD)
EPSS score
0.55%
0%100%
Low · +0.02 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 1 · Related 2

Timeline

  1. 27-11-2024
    PublishedVulnerability first disclosed.
  2. 03-12-2024
    Last modifiedVulnerability information updated.

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.

CVSS metrics

7 scores · 7 sources · 1 version

EPSS trend

Probability

0.55%

Chance of exploitation in the next 30 days

Percentile

47%

Versus all other CVEs

30-day change

Increase +0.02 pp

From 0.53% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.

Chainguard2 products
  • gh< 2.63.0-r0
  • wolfictl< 0.26.0-r1
Wolfi2 products
  • gh< 2.63.0-r0
  • wolfictl< 0.26.0-r1
Cli1 product
Debian1 product
  • golang-github-cli-go-gh-v2All versions (No fix recorded)
Github.com/cli1 product
  • go-ghAll versions (No fix recorded)
Github.com/cli/go-gh1 product
  • v2< 2.11.1
Ubuntu1 product
  • golang-github-cli-go-gh-v2< 2.6.0-1ubuntu0.24.04.1~esm1 | All versions (No fix recorded)

7 vendors · 9 products

References

14 links
Show all 14 references