Skip to main content

CVE-2025-48938: CWE-501: Trust Boundary Violation in cli go-gh

Low
VulnerabilityCVE-2025-48938cvecve-2025-48938cwe-501
Published: Fri May 30 2025 (05/30/2025, 18:45:59 UTC)
Source: CVE Database V5
Vendor/Project: cli
Product: go-gh

Description

go-gh is a collection of Go modules to make authoring GitHub CLI extensions easier. A security vulnerability has been identified in versions prior to 2.12.1 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. 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. No known workarounds are available other than upgrading.

AI-Powered Analysis

AILast updated: 07/08/2025, 13:56:00 UTC

Technical Analysis

CVE-2025-48938 is a security vulnerability identified in the go-gh project, a set of Go modules designed to facilitate the creation of GitHub CLI extensions. The vulnerability exists in versions prior to 2.12.1 and is classified as a CWE-501: Trust Boundary Violation. Specifically, the issue arises when a user interacts with a GitHub Enterprise Server that is attacker-controlled. In this scenario, the server can manipulate HTTP URLs that the go-gh client expects to open in a browser by substituting them with local file paths. This manipulation can cause the client to execute arbitrary commands on the user's machine by opening or executing local files instead of safe HTTP URLs. The root cause is insufficient validation and sanitization of URLs before they are passed to the Browser.Browse() function. The fix introduced in version 2.12.1 enhances Browser.Browse() to strictly allow or disallow certain scenarios, preventing the execution or opening of local filesystem files while maintaining the ability to handle legitimate HTTP URLs. No workarounds exist other than upgrading to the patched version. The CVSS 4.0 score is 2.6, indicating a low severity, primarily because exploitation requires a privileged user context (PR:L), no user interaction (UI:N), and the attack vector is network-based (AV:N). The scope is high (S:H), meaning the vulnerability affects components beyond the vulnerable module, but the impact on confidentiality, integrity, and availability is none (VC:N, VI:N, VA:N). No known exploits are currently in the wild.

Potential Impact

For European organizations, the impact of this vulnerability is relatively limited but non-negligible. Since go-gh is used to develop GitHub CLI extensions, it is primarily relevant to developers and DevOps teams who interact with GitHub Enterprise Servers. An attacker controlling a GitHub Enterprise Server could exploit this vulnerability to execute arbitrary commands on the developer's local machine, potentially leading to unauthorized code execution, data leakage, or further compromise of the developer's environment. This could undermine the integrity of the software development lifecycle, especially in organizations relying heavily on GitHub Enterprise for source code management. However, the low CVSS score and the requirement for a privileged user context reduce the likelihood of widespread impact. Still, organizations with sensitive development environments or those using customized GitHub Enterprise Servers should consider this a risk. The vulnerability could also be leveraged in targeted attacks against high-value development teams or critical infrastructure projects within Europe.

Mitigation Recommendations

The primary and only effective mitigation is to upgrade all instances of go-gh to version 2.12.1 or later, where the Browser.Browse() function has been enhanced to prevent this attack vector. Organizations should audit their development environments to identify usage of go-gh modules and ensure timely patching. Additionally, organizations should enforce strict controls and monitoring on GitHub Enterprise Server configurations, limiting the ability of untrusted parties to influence URL content. Implementing network segmentation and access controls to restrict developer machines' exposure to untrusted GitHub Enterprise Servers can further reduce risk. Security teams should educate developers about the risks of interacting with untrusted or unknown GitHub Enterprise instances. Finally, integrating runtime application self-protection (RASP) or endpoint detection and response (EDR) solutions can help detect anomalous command executions resulting from exploitation attempts.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2025-05-28T18:49:07.579Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6839ffe7182aa0cae2bc9d5d

Added to database: 5/30/2025, 6:58:47 PM

Last enriched: 7/8/2025, 1:56:00 PM

Last updated: 8/5/2025, 8:33:11 PM

Views: 16

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats