CVE-2025-48938

CVE-2025-48938 is a medium-severity security vulnerability in github.com/cli/go-gh/v2 (go), affecting versions < 2.12.1. It is fixed in 2.12.1.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Prevent GitHub CLI and extensions from executing arbitrary commands from compromised GitHub Enterprise Server

A security vulnerability has been identified in go-gh where an attacker-controlled GitHub Enterprise Server could result in executing arbitrary commands on a user's machine by replacing HTTP URLs provided by GitHub with local file paths for browsing.

Details

The GitHub CLI and CLI extensions allow users to transition from their terminal for a variety of use cases through the Browser capability in github.com/cli/go-gh/v2/pkg/browser:

  • Using the -w, --web flag, GitHub CLI users can view GitHub repositories, issues, pull requests, and more using their web browser
  • Using the gh codespace command set, GitHub CLI users can transition to Visual Studio Code to work with GitHub Codespaces

This is done by using URLs provided through API responses from authenticated GitHub hosts when users execute gh commands.

Prior to 2.12.1, Browser.Browse() would attempt to open the provided URL using a variety of OS-specific approaches regardless of the scheme. An attacker-controlled GitHub Enterprise Server could modify API responses to use a specially tailored local executable path instead of HTTP URLs to resources. This could allow the attacker to execute arbitrary executables on the user's machine.

In 2.12.1, Browser.Browse() has been enhanced to allow and disallow a variety of scenarios to avoid opening or executing files on the filesystem without unduly impacting HTTP URLs:

  1. URLs with http://, https://, vscode://, vscode-insiders:// protocols are supported
  2. URLs with file:// protocol are unsupported
  3. URLs matching files or directories on the filesystem are unsupported
  4. URLs matching executables in the user's path are unsupported

URLs without protocols will be browsable if none of these other conditions apply.

As we have more information about use cases, maintainers can expand these capabilities for an improved user experience that allows configuring allowed URL schemes and/or prompt the user for an unexpected user case and confirming whether to continue.

Remediation and Mitigation

  1. Upgrade go-gh to 2.12.1

Impact

Successful exploitation could cause users of the attacker-controlled GitHub Enterprise Server to execute arbitrary commands.

Affected versions

github.com/cli/go-gh/v2 (< 2.12.1)

Security releases

github.com/cli/go-gh/v2 → 2.12.1 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade github.com/cli/go-gh/v2 to 2.12.1 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-48938? CVE-2025-48938 is a medium-severity security vulnerability in github.com/cli/go-gh/v2 (go), affecting versions < 2.12.1. It is fixed in 2.12.1.
  2. Which versions of github.com/cli/go-gh/v2 are affected by CVE-2025-48938? github.com/cli/go-gh/v2 (go) versions < 2.12.1 is affected.
  3. Is there a fix for CVE-2025-48938? Yes. CVE-2025-48938 is fixed in 2.12.1. Upgrade to this version or later.
  4. Is CVE-2025-48938 exploitable, and should I be worried? Whether CVE-2025-48938 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2025-48938 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2025-48938? Upgrade github.com/cli/go-gh/v2 to 2.12.1 or later.

Other vulnerabilities in github.com/cli/go-gh/v2

Stop the waste.
Protect your environment with Kodem.