Skip to main content

Gogs EUVDEUVD-2026-39069

| CVE-2026-52800 HIGH
Cross-Site Request Forgery (CSRF) (CWE-352)
2026-06-23 https://github.com/gogs/gogs GHSA-pwx3-qcgw-vh7h
8.8
CVSS 3.1 · Vendor: https://github.com/gogs/gogs
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attacker registers Gogs account
  2. Delivery
    Crafts org/teams/owners/action/add GET URL
  3. Exploit
    Delivers link to org owner via phishing
  4. Install
    Owner's browser sends authenticated GET
  5. C2
    CSRF check skipped for GET method
  6. Execute
    Attacker added to Owners team
  7. Impact
    Full organization takeover

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V3 - Web Frontend Security Anti-CSRF tokens, SameSite cookies
MITRE ATT&CK

1 technique across 1 tactic: Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires (1) a Gogs instance running a version prior to 0.14.3, (2) a victim who is an *organization owner* (regular members cannot add to Owners - TeamsAction enforces c.Org.IsOwner), (3) the victim is currently logged into Gogs in the same browser, and (4) the victim performs a top-level navigation or otherwise loads an attacker-supplied URL on the Gogs origin. The attacker must already have a valid Gogs account whose username/uid is supplied as uname/uid. Limiting factors: user interaction is required (UI:R), SameSite cookie defaults in modern browsers may block the cross-site navigation if the session cookie is SameSite=Lax/Strict, and instances with only one owner per organization have no escalation target.

Impact

CVSS 3.1 8.8 (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) reflects high impact but the UI:R component is load-bearing - exploitation requires a logged-in organization owner to follow an attacker-crafted link, so this is a targeted social-engineering attack rather than an opportunistic RCE. There is no EPSS or SSVC data in the input and the CVE is not in CISA KEV, so no evidence of in-the-wild exploitation; the advisory itself ships a working reproduction URL, which is effectively a public PoC even though no separate exploit code is catalogued. The PR:N rating is technically correct from the attacker's perspective (they send nothing themselves), but the privilege of the *victim* (organization owner) is the real precondition and meaningfully narrows the target population to instances with multi-owner organizations. Net: a credible, easy-to-weaponize phishing-style vector against Gogs operators, but real-world prevalence depends on whether owners can be lured to attacker-controlled pages.

Exploit ScenarioDerived

An attacker registers a normal Gogs account, then posts a link (in an issue comment, email, or external chat) such as http://gogs.example.com/org/acme/teams/owners/action/add?uid=42&uname=attacker to a known organization owner. When the owner clicks it while logged in, the browser issues an authenticated GET, no CSRF token is checked, and the attacker is added to the Owners team - yielding full control over private repositories, settings, and members. The advisory itself documents the exact reproduction URL, so weaponization is trivial.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 23, 2026

Cross-site request forgery in Gogs 0.14.1 lets a remote attacker escalate to organization owner by tricking a logged-in owner into loading a crafted URL. The /teams/:team/action/:action route accepts GET requests and the global CSRF check only fires on POST, so an add action against the Owners team executes without a token. No public exploit is identified at time of analysis beyond the advisory's reproduction steps, and the issue is not listed in CISA KEV.

RemediationAI

Vendor-released patch: upgrade to Gogs 0.14.3 (https://github.com/gogs/gogs/releases/tag/v0.14.3), which restricts /members/action/:action, /teams/:team/action/:action, and /teams/:team/action/repo/:action to POST only via PR https://github.com/gogs/gogs/pull/8321 (commit 070df61ecd14c75b0aca93090f860b87ab17ac19). If immediate upgrade is not possible, block GET requests to /org/*/teams/*/action/* and /org/*/members/action/* at a reverse proxy (nginx/Caddy/Traefik) - be aware this will break any legacy bookmark, browser autocompletion entry, or external integration that relied on those GET URLs. As a behavioural mitigation, instruct organization owners to log out of Gogs when browsing untrusted sites and consider enforcing SameSite=Lax/Strict on the Gogs session cookie if your reverse proxy can rewrite Set-Cookie, which prevents the cross-site top-level navigation from carrying the session.

Affected VersionsENISA

gogs < 0.14.3

Affected Packages

go gogs.io/gogs fix: 0.14.3
euvd gogs fix: 0.14.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Gogs is a self-hosted Go-based Git service (CPE pkg:go/gogs.io_gogs) that registers its organization team management endpoint with m.Route("/teams/:team/action/:action", "GET,POST", org.TeamsAction) in internal/cmd/web.go:390. The global CSRF middleware in internal/context/auth.go:56-61 validates tokens only when c.Req.Method == "POST", so any state change reached via GET bypasses validation entirely - the textbook CWE-352 (Cross-Site Request Forgery) pattern of mixing safe-method routing with unsafe side effects. TeamsAction reads uid/uname from the query string and calls c.Org.Team.AddMember, and because OrgUser.IsOwner is set to true whenever the joined team is the Owners team (internal/database/org_team.go:566-576), a single forged GET grants full organization control. The related /members/action/:action route has the same shape.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/gogs/gogs) PRIMARY 8.8 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 8.8 HIGH

Network-reachable CSRF, no attacker auth (PR:N), but requires victim owner to click (UI:R); full org control yields C/I/A:H within the same security scope.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE HIGH

Primary rating from Vendor (https://github.com/gogs/gogs).

CVSS VectorVendor: https://github.com/gogs/gogs

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

Summary

In Gogs 0.14.1, 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.

---

Description

When a victim is logged in as an organization owner, team member management endpoints are exposed via routes reachable by GET requests, allowing state-changing operations without a CSRF token.

Team action route allows GET

internal/cmd/web.go:390

go
m.Route("/teams/:team/action/:action", "GET,POST", org.TeamsAction)

CSRF validation is applied only to POST requests

Because the global CSRF check is limited to POST requests, state-changing operations reached via GET bypass CSRF protection entirely.

internal/context/auth.go:56-61

go
if !options.SignOutRequired && !options.DisableCSRF &&
   c.Req.Method == "POST" && !isAPIPath(c.Req.URL.Path) {
    csrf.Validate(c.Context, c.csrf)
    if c.Written() {
        return
    }
}

TeamsAction performs state changes regardless of HTTP method

TeamsAction does not branch on the HTTP method. Instead, it performs state-changing operations (such as adding or removing members) based solely on query parameters (uid, uname) and the :action path parameter. Since the route explicitly allows GET, the add action can be executed via GET.

internal/route/org/teams.go:38-83

go
func TeamsAction(c *context.Context) {
    uid := com.StrTo(c.Query("uid")).MustInt64()
    if uid == 0 {
        c.Redirect(c.Org.OrgLink + "/teams")
        return
    }

    page := c.Query("page")
    var err error
    switch c.Params(":action") {
    case "add":
        if !c.Org.IsOwner {
            c.NotFound()
            return
        }
        uname := c.Query("uname")
        var u *database.User
        u, err = database.Handle.Users().GetByUsername(c.Req.Context(), uname)
        // ...
        err = c.Org.Team.AddMember(u.ID)
        page = "team"
    }
}

Adding a user to the Owners team grants organization owner privileges

When a user joins the Owners team, OrgUser.IsOwner is set to true. Therefore, adding a user to the Owners team directly results in granting organization owner-equivalent privileges.

internal/database/org_team.go:566-576

go
ou := new(OrgUser)
if _, err = sess.Where("uid = ?", userID).
    And("org_id = ?", orgID).Get(ou); err != nil {
    return err
}
ou.NumTeams++
if t.IsOwnerTeam() {
    ou.IsOwner = true
}
if _, err = sess.ID(ou.ID).AllCols().Update(ou); err != nil {
    return err
}

Related issue: organization member actions are also state-changing via GET

For reference, organization member management endpoints are also exposed as GET routes that perform state changes without CSRF protection.

internal/cmd/web.go:382

go
m.Get("/members/action/:action", org.MembersAction)

MembersAction similarly does not branch on HTTP method and performs state-changing operations (public/private toggle, remove, leave) based on query parameters and the :action path parameter.

internal/route/org/members.go:31-71

go
func MembersAction(c *context.Context) {
    uid := com.StrTo(c.Query("uid")).MustInt64()
    if uid == 0 {
        c.Redirect(c.Org.OrgLink + "/members")
        return
    }

    org := c.Org.Organization
    var err error
    switch c.Params(":action") {
    case "private":
        err = database.ChangeOrgUserStatus(org.ID, uid, false)
    case "public":
        err = database.ChangeOrgUserStatus(org.ID, uid, true)
    case "remove":
        err = org.RemoveMember(uid)
    case "leave":
        err = org.RemoveMember(c.User.ID)
    }
}

---

Steps to Reproduce

  1. Prepare a target user account to be added (e.g., attacker).
  2. Confirm that the victim user is an owner of the target organization (e.g., org3) and is logged in.
  3. Cause the victim’s browser to perform a top-level navigation to the following URL:
   http://localhost:10880/org/org3/teams/owners/action/add?uid=1&uname=attacker

<img width="2019" height="322" alt="image" src="https://github.com/user-attachments/assets/342a627a-04e8-47bd-818a-9c2b05a75446" />

  1. After the request completes, verify that the attacker user can access:
   http://localhost:10880/org/org3/settings

confirming that organization owner privileges have been obtained.

<img width="2010" height="285" alt="image" src="https://github.com/user-attachments/assets/03945bb1-e9c5-4e42-ad3a-9f6d63b7d86d" />

<img width="2016" height="893" alt="image" src="https://github.com/user-attachments/assets/55d7db13-52cf-471b-a6d3-aa4186c8b547" />

---

Impact

Successful exploitation allows an attacker to obtain organization owner privileges, resulting in:

  • Full control over organization repositories, settings, and members
  • Unauthorized access to private repositories (confidentiality impact)
  • Modification or deletion of repositories and settings (integrity impact)
  • Repository deletion or disruption leading to service unavailability (availability impact)

Executive ViewAI

Why It Matters

Gogs 0.14.1 contains a privilege escalation vulnerability (CVSS 8.8) that allows attackers to gain organization owner status through social engineering if a current owner clicks a malicious link. Organizations using this self-hosted Git platform risk loss of repository and source code access control, requiring urgent patching to prevent unauthorized administrative compromise.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 84% exploitable
Prevalence
Medium
popular self-hosted Git server but smaller footprint than Gitea/GitLab
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy