CVE-2026-77918 in Gogs
Summary
by MITRE • 11/24/2026
Gogs through 0.14.4 contains an information disclosure vulnerability that allows authenticated users to view private forks by querying fork listings without per-fork read checks. Attackers with read access to a private base repository can call GET /api/v1/repos/{owner}/{repo}/forks or the Forks web handler to obtain other users' private fork owners, names, descriptions and clone URLs.
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 11/24/2026
The vulnerability identified in Gogs versions through 0.14.4 represents a significant flaw in access control logic within the repository forking mechanism. This issue is classified as an information disclosure vulnerability where authenticated users can bypass intended restrictions on private repositories. Specifically, the application fails to enforce per-fork read permissions when generating lists of forks associated with a base repository. While Gogs correctly restricts direct access to individual forked repositories based on their privacy settings and user authorization, it neglects to apply similar checks during the aggregation phase for listing purposes. This architectural oversight allows an attacker who possesses valid credentials and read access to at least one private base repository to enumerate all forks created by other users against that same repository.
From a technical perspective, the flaw resides in the API endpoint GET /api/v1/repos/{owner}/{repo}/forks as well as the corresponding Forks web handler interface. When these endpoints are invoked, the backend logic retrieves fork metadata without verifying whether the requesting user has explicit permission to view each specific forked instance. Consequently, the response payload includes sensitive details for all forks associated with the base repository, regardless of their privacy status or ownership restrictions. The exposed data typically encompasses the owner identifiers, repository names, descriptive text fields, and clone URLs. This behavior effectively leaks structural information about the codebase ecosystem that should remain isolated to authorized stakeholders only.
The operational impact of this vulnerability is primarily centered on reconnaissance and intelligence gathering rather than immediate system compromise. By obtaining a list of private forks along with their metadata, an attacker can map out the development activities and organizational structure surrounding a target project. The disclosure of clone URLs provides direct pathways for further exploitation if those forked repositories contain additional vulnerabilities or sensitive configuration files that might be less protected than the base repository. Furthermore, revealing owner identities allows attackers to correlate these accounts with other services through open-source intelligence techniques, potentially leading to targeted phishing campaigns or social engineering attacks against specific developers involved in the project.
This vulnerability aligns closely with CWE-200, which defines information exposure as a category of weaknesses where sensitive data is accessible without proper authorization. It also relates to CWE-611, concerning improper restriction of XML external entity references if such parsing occurs during metadata handling, though the primary issue here is access control failure rather than injection. In terms of the MITRE ATT&CK framework, this behavior facilitates the Reconnaissance phase, specifically under techniques related to gathering victim identity information and identifying software vulnerabilities within an organization's infrastructure. The ability to enumerate private forks provides attackers with a clearer picture of the attack surface and potential entry points for future exploitation attempts against less hardened forked instances.
Mitigation strategies must focus on enforcing strict access control checks at every level of data retrieval, not just during direct object access. Developers should modify the fork listing logic to verify that the requesting user has permission to view each individual fork before including it in the response payload. This requires iterating through potential forks and checking their associated permissions against the current session's privileges. For organizations currently running vulnerable versions, upgrading to a patched version of Gogs is the primary remediation step. In environments where immediate patching is not feasible, network-level controls such as web application firewalls can be configured to monitor for excessive enumeration requests or unusual patterns in fork listing API calls, although this offers only partial protection against determined attackers who may vary their request parameters.