Information Exposure Affecting github.com/cli/go-gh/v2/pkg/auth package, versions <2.11.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (12th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMCLIGOGHV2PKGAUTH-8442236
  • published28 Nov 2024
  • disclosed27 Nov 2024
  • creditRy0taK

Introduced: 27 Nov 2024

NewCVE-2024-53859  (opens in a new tab)
CWE-200  (opens in a new tab)

How to fix?

Upgrade github.com/cli/go-gh/v2/pkg/auth to version 2.11.1 or higher.

Overview

Affected versions of this package are vulnerable to Information Exposure due to the auth.TokenForHost function. An attacker can redirect authentication tokens intended for specific hosts to unauthorized hosts by exploiting the improper token sourcing mechanism within a codespace environment.

Note: This exploitation depends on the environment variables: if GITHUB_TOKEN or GH_TOKEN are set and if the application is running in a codespace that is not GitHub.com or ghe.com.

CVSS Scores

version 4.0
version 3.1