HIGH 8.8

CVE-2026-52800: Gogs CSRF Vulnerability Allows Organization Owner Compromise

Gogs, a self-hosted Git service, contains a cross-site request forgery (CSRF) vulnerability in organization team management that allows an attacker to add themselves as an owner of an organization without explicit user consent. An attacker can craft a malicious link that, when clicked by a logged-in organization owner, silently grants the attacker owner-level privileges. This attack requires no special access or technical skill from the attacker—only social engineering to trick a victim into clicking a link. The vulnerability affects all versions prior to 0.14.3.

Source data · NVD / CISA · public domain

CVSS
3.1 · 8.8 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weaknesses (CWE)
CWE-352
Affected products
0 configuration(s)
Published / Modified
2026-06-24 / 2026-06-26

NVD description (verbatim)

Gogs is an open source self-hosted Git service. Prior to 0.14.3, organization team member management can be performed via GET requests without CSRF protection. If a victim who is an organization owner is logged in and is tricked into visiting a crafted link, an attacker-controlled user can be added to the Owners team. As a result, the attacker gains organization owner–equivalent privileges. This vulnerability is fixed in 0.14.3.

5 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

Gogs versions before 0.14.3 permit organization team member management operations via GET requests without CSRF token validation. The vulnerability exists in the endpoint(s) responsible for adding team members to organization teams, specifically the Owners team. Because the vulnerable action uses HTTP GET semantics and lacks anti-CSRF protections (such as token validation or SameSite cookie attributes), an attacker can embed a crafted URL in a webpage, email, or chat message. When a victim with organization owner privileges navigates to that URL while authenticated to Gogs, the browser automatically includes the victim's session cookies, causing the malicious team membership change to execute in the victim's security context. This is a classic CSRF vulnerability (CWE-352) affecting state-changing operations.

Business impact

A successful exploit grants an attacker persistent administrative access to a Gogs organization, including the ability to read, modify, or delete repositories, manage team memberships, alter organization settings, and potentially access sensitive code or credentials stored within. For enterprises using Gogs as an internal Git platform, this represents a direct pathway to code repository compromise, intellectual property theft, or supply chain sabotage. The attack is particularly dangerous because it requires only that a victim visit a link—no phishing of credentials, no exploit development, no vulnerability chaining. Recovery requires identifying unauthorized owner accounts, auditing all actions taken by compromised accounts, and potentially rolling back unwanted changes.

Affected systems

Gogs versions 0.14.2 and earlier are vulnerable. This includes all self-hosted instances running versions prior to 0.14.3, regardless of deployment environment (on-premises, cloud, containerized). The official Gogs project has confirmed the issue and released a patch. Organizations that maintain internal Gogs instances or those that rely on community-managed Gogs deployments should prioritize inventory and assessment of their Gogs version.

Exploitability

The attack is trivial to execute and requires no authenticated access from the attacker. An attacker simply constructs a URL embedding the malicious action (e.g., adding a user to the Owners team) and distributes it via email, forum post, chat, or embedded in a webpage. The victim must be logged into Gogs at the time they visit the link, but no warning or confirmation is presented. The barrier to exploitation is social engineering capability, not technical skill. The CVSS 3.1 score of 8.8 (HIGH severity) reflects the combination of network accessibility, low attack complexity, no privilege requirement, and user interaction that results in high confidentiality, integrity, and availability impact.

Remediation

Upgrade Gogs to version 0.14.3 or later. This patch adds proper CSRF token validation to team management endpoints and likely implements additional state-change protections. Before upgrading, review your Gogs instance for unauthorized organization owners added after the initial deployment, audit recent team membership changes, and verify that no malicious actions were taken by compromised accounts. After patching, monitor for any additional suspicious activity.

Patch guidance

Update your Gogs installation to version 0.14.3 or a later stable release as soon as feasible. If running Gogs in a container, rebuild or pull the image tagged 0.14.3 or later. If running from source, pull the latest code from the official Gogs repository and rebuild. Test the upgrade in a staging environment first to confirm compatibility with any custom configurations or plugins. Once deployed, verify that existing team memberships are still intact and correct. Monitor Gogs logs for any failed or suspicious team management operations immediately after deployment.

Detection guidance

Review organization team membership logs, particularly additions to the Owners team, for entries that lack corresponding audit records or that were added by accounts you do not recognize. Check for unusual HTTP GET requests to team management endpoints (typically paths like /org/{org}/teams/*/members) from external or unexpected origins. Enable HTTP access logging if not already enabled, and search for GET requests to team-related endpoints that result in state changes (HTTP 200 or 302 responses). If Gogs supports request logging or CSRF-related warnings, review those logs for POST-to-GET downgrades or missing CSRF tokens. Correlate team membership changes with phishing emails or suspicious links sent to your organization owners during the same timeframe.

Why prioritize this

This vulnerability merits immediate prioritization because it combines high ease of exploitation with severe impact. An attacker needs no technical sophistication, no discovered credentials, and no persistence mechanism—a single click by a victim grants permanent administrative access. The impact includes full repository compromise and potential code theft or supply chain attacks. Unlike vulnerabilities requiring multi-step exploitation or rare conditions, CSRF attacks on administrative functions are a proven and common attack vector. Any Gogs instance exposed to the internet or accessible to users who might receive social-engineered messages should be patched urgently.

Risk score, explained

The CVSS 3.1 score of 8.8 reflects: Network accessibility (attacker requires no direct network access to the target system, only ability to send a link to victims); Low attack complexity (no special tools, timing, or conditions required); No privilege requirement (attacker begins unauthenticated); User interaction required (victim must click the link, but no special awareness is needed); and Unchanged scope. The impact is rated high across all three dimensions—confidentiality (attacker can read all organization repositories), integrity (attacker can modify or delete code), and availability (attacker can lock out legitimate owners or delete repositories). Together, these factors yield an 8.8 HIGH severity rating, placing this in the upper tier of exploitable vulnerabilities that demand rapid remediation.

Frequently asked questions

If we have a WAF or reverse proxy in front of Gogs, does that protect us from this vulnerability?

A WAF may provide some mitigation if it is configured to detect and block suspicious team management requests or to enforce CSRF tokens, but this is not a substitute for patching. Many WAFs do not inspect GET parameter payloads deeply, and an attacker can craft links that appear benign at the network level. Additionally, if your organization's users access Gogs directly without a WAF (e.g., via VPN or internal network), the WAF offers no protection. Patching Gogs is the only reliable remediation.

We use Gogs in an air-gapped internal network. Do we still need to patch?

Yes. Even in an air-gapped environment, this vulnerability can be exploited if an attacker has some means of reaching your internal network—through a compromised workstation, a supply chain compromise, or an insider threat. Additionally, air-gapped networks are not always as isolated as intended. Patching eliminates the vulnerability entirely and aligns with defense-in-depth principles. If your network is truly air-gapped with strict egress filtering and no possibility of external communication, the risk is lower, but updating Gogs to 0.14.3 remains a best practice.

How can we identify if this vulnerability was exploited in our Gogs instance before we patch?

Review the audit logs or team management history in your Gogs instance for any additions to the Owners team that you do not recognize or that lack corresponding user actions. If Gogs logs HTTP requests, search those logs for GET requests to team endpoints around the dates when unexpected owners appeared. Cross-reference team membership changes with phishing reports or suspicious emails received by your organization leaders. If you find unauthorized owners, disable their accounts immediately, audit all actions they performed, and investigate whether any repositories were accessed or modified.

Does this vulnerability affect Gogs if we disable the web UI and only allow Git over SSH?

No. If you do not expose the web UI to any users or if users do not interact with it, the web-based CSRF attack cannot be delivered. However, if the web UI is accessible to any user (even for read-only operations like viewing repositories), an attacker can still craft a malicious link targeting that interface. Additionally, if you ever need to re-enable the web UI or if it is accidentally exposed, the vulnerability would reappear. Patching ensures protection regardless of deployment configuration.

This analysis is provided for informational purposes and reflects the state of publicly available information as of the publication date. No guarantee is made regarding the completeness or accuracy of this assessment. Organizations should verify all details against official vendor advisories and test patches in their own environments before deployment. The presence or absence of a CVE in CISA's Known Exploited Vulnerabilities catalog does not indicate whether active exploitation is occurring in the wild; organizations should consult threat intelligence feeds and their own monitoring for current threat data. This vulnerability analysis does not constitute professional security advice; consult your organization's security team or a qualified security consultant for guidance specific to your environment. Source: NVD (public-domain), retrieved 2026-08-02. Analysis generated by SEC.co (claude-haiku-4-5).