CVE-2026-52799: Gogs Attachment Authorization Bypass – Unauthenticated Private Repository Access
Gogs, a self-hosted Git service, contains an authorization bypass vulnerability affecting versions before 0.14.3. An attacker can download file attachments from private repositories without proper authentication or permission checks. The vulnerability exists because the endpoint serving attachments (GET /attachments/:uuid) does not validate whether the requester has access to the associated Issue, Comment, Release, or repository. In environments configured to allow unauthenticated access, this exposes sensitive attached files to unauthorized parties.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Weaknesses (CWE)
- CWE-639, CWE-862
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-24 / 2026-06-25
NVD description (verbatim)
Gogs is an open source self-hosted Git service. Prior to 0.14.3, GET /attachments/:uuid returns the raw attachment file without verifying whether the requester has view permission for the associated Issue/Comment/Release or the repository. In a test environment with REQUIRE_SIGNIN_VIEW = false, we confirmed that an unauthenticated user can download attachments belonging to a private repository. This vulnerability is fixed in 0.14.3.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The GET /attachments/:uuid endpoint in Gogs fails to enforce access control before returning raw attachment content. The vulnerability combines missing authorization checks (CWE-862) with improper access restriction (CWE-639). An attacker can enumerate or predict attachment UUIDs and retrieve files without authentication, particularly in deployments with REQUIRE_SIGNIN_VIEW disabled. The lack of permission verification means attachments tied to private repository issues, pull request comments, or release notes become accessible to any network-adjacent attacker.
Business impact
Organizations running Gogs as a private code repository risk exposure of sensitive artifacts, design documents, credentials, or proprietary code fragments embedded in issue attachments or release notes. The compromise is especially severe for small teams or internal development environments that assume self-hosted Git services enforce repository privacy by default. An attacker gains reconnaissance data and potentially operational secrets without leaving authentication logs.
Affected systems
Gogs versions prior to 0.14.3 are affected. Deployments are vulnerable if they use self-hosted instances with the GET /attachments endpoint exposed to network requests. The risk is highest in environments configured with REQUIRE_SIGNIN_VIEW = false, though even standard setups with authentication disabled for certain operations remain exposed. This affects Gogs installations across all deployment models (Docker, binary, source).
Exploitability
Exploitation requires no authentication, no user interaction, and minimal complexity. An attacker needs only network access to the Gogs instance and knowledge of or ability to discover attachment UUIDs. The barrier to exploitation is low; UUID enumeration or prediction may be feasible depending on UUID generation practices. The CVSS 7.5 (HIGH) score reflects the ease of remote exploitation and the confidentiality impact, absent any network segmentation or rate-limiting controls.
Remediation
Upgrade to Gogs 0.14.3 or later. The fix implements authorization checks that verify the requester's access to the parent Issue, Comment, Release, or repository before serving attachments. Organizations should verify their current Gogs version and apply the patch immediately. For instances that cannot upgrade immediately, restrict network access to the Gogs instance and enable REQUIRE_SIGNIN_VIEW to enforce authentication for all operations.
Patch guidance
Verify your current Gogs installation version using the admin panel or by checking the binary/release notes. Download version 0.14.3 or the latest stable release from the official Gogs repository. Apply the patch following Gogs deployment documentation (binary update, Docker image pull, or source rebuild as applicable). Restart the Gogs service and confirm the version change in the admin interface. No data migration is required; the fix is a pure code update.
Detection guidance
Monitor for unusual requests to GET /attachments/ endpoints, especially patterns indicating UUID enumeration (rapid sequential requests with different UUID values). Log and alert on successful attachment downloads from unauthenticated sessions or sessions lacking repository access. Audit attachment download logs to identify whether private repository attachments were accessed during the vulnerable period. Network-level detection is challenging without verbose logging; prioritize log analysis on affected Gogs instances.
Why prioritize this
While not yet listed on the KEV catalog, this vulnerability presents moderate urgency due to its high CVSS score (7.5) and ease of exploitation. Self-hosted Git repositories are common attack targets for reconnaissance and data theft. Organizations should prioritize patching to close this low-barrier path to private repository disclosure. The lack of KEV status does not diminish the practical risk in environments where Gogs serves sensitive code or documentation.
Risk score, explained
CVSS 3.1 score of 7.5 reflects HIGH severity: Network-accessible endpoint (AV:N), low attack complexity (AC:L), no privilege or user interaction required (PR:N/UI:N), and high confidentiality impact (C:H). No integrity or availability impact, hence the C:H/I:N/A:N profile. The score appropriately captures the risk of unauthorized file disclosure without overstating the threat (confidentiality only).
Frequently asked questions
Can authenticated users also exploit this, or only unauthenticated attackers?
Both. The vulnerability stems from missing authorization checks, not just missing authentication. Even an authenticated user without access to a private repository can download its attachments by guessing or discovering the UUID. This broadens the threat from external reconnaissance to insider threats or compromised low-privilege accounts.
Does upgrading to 0.14.3 require downtime or affect existing repositories?
No. Upgrading Gogs is typically non-disruptive. The fix is a code-level change to the attachment endpoint logic and does not require database migrations, repository re-initialization, or configuration changes. Brief service restart may be needed; plan the upgrade during a maintenance window, but data loss is not a concern.
If my Gogs instance is behind a firewall and only accessible to internal users, am I still at risk?
Your risk is lower but not eliminated. If internal users lack repository access (e.g., DevOps team accessing developer-only repos), they could still abuse the attachment endpoint. Additionally, misconfigurations, VPN compromises, or lateral movement inside the network could expose the vulnerability. Patching remains the safest long-term control.
How can I tell if this vulnerability was exploited on my instance during the vulnerable window?
Review Gogs access logs for GET requests to /attachments/ from users or IP addresses that should not have access to those repositories. Correlate the timestamps with your Gogs version history to identify the vulnerable period. If logs show attachment downloads from unauthenticated sessions or mismatched repository access, investigate further for data exfiltration.
This analysis is provided for educational and operational security purposes. The vulnerability details and CVSS score are sourced from official CVE records and vendor advisories; verify patch version numbers and remediation steps against the official Gogs project before deployment. No exploit code or weaponized proof-of-concept is provided. Organizations should conduct internal risk assessments aligned with their security policies and threat models. Source: NVD (public-domain), retrieved 2026-08-02. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-46414HIGHMicrosoft UFO WebSocket Authentication Bypass and Role Spoofing
- CVE-2026-46558HIGHPlane Cross-Workspace Authorization Bypass (v1.3.1 Patch)
- CVE-2026-54010HIGHOpen WebUI File Access Control Bypass
- CVE-2026-54322HIGHDaytona Cross-Organization Role Authorization Bypass
- CVE-2026-56424HIGHMISP Authorization Bypass Enabling Cross-Organization Data Tampering
- CVE-2026-41160MEDIUMEspoCRM Broken Access Control in Note Pinning API (v9.3.5 Patch)
- CVE-2026-48783MEDIUMPostiz Unauthenticated Token Validation Flaw in /public/modify-subscription
- CVE-2018-25391HIGHHaPe PKH 1.1 Authorization Bypass – Unauthorized Record Deletion Vulnerability