CVE-2026-52815Medium▾ TwilightPoC availableGogs Vulnerable to Unauthenticated Organization Teams Information Disclosure via API
▾ Twilight zone — High severity, or a signal on a lesser flaw
impact 27.5 · likelihood 0.3 · exploitation 12
A public proof-of-concept already exists for this vulnerability — see Exploit availability below.
Public exploit / PoC code seen in 1 source. Availability, not in-the-wild use.
Exploit-prediction probability, daily snapshots since Jul 4.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via GHSA
1.6%
Nuclei ×1
Gogs has an unauthenticated information disclosure vulnerability. The GET /api/v1/orgs/:orgname/teams endpoint at internal/route/api/v1/org_team.go:8 returns all teams for any organization without requiring authentication. The route group at internal/route/api/v1/api.go:380-385 lacks the reqToken() middleware, and the listTeams() handler performs no authentication check, exposing team IDs, names, descriptions, and permission levels to any unauthenticated caller.
Gogs (all current versions)
internal/route/api/v1/api.go lines 380-385:
// Org teams route group — no reqToken() middleware
m.Group("/:orgname", func() {
m.Get("/teams", org.ListTeams) // No auth required
}, orgAssignment(true))
The orgAssignment(true) middleware only loads the organization object — it performs no authentication. The listTeams() handler at org_team.go:8 returns all teams unconditionally:
func ListTeams(c *context.APIContext) {
org := c.Org.Organization
teams, err := database.GetTeamsByOrgID(org.ID)
// Returns all teams — no c.IsLogged check, no permission check
}
Compare with other org endpoints that correctly require authentication:
m.Group("/orgs/:orgname", func() {
// ... other endpoints ...
}, reqToken(), orgAssignment(true, true)) // reqToken() enforces auth
GET /api/v1/orgs/target-org/teams with no authenticationorgAssignment(true) loads the organization but does not check authListTeams() queries all teams and returns them# List all teams in an organization — no authentication needed
curl -s "http://TARGET:3000/api/v1/orgs/myorg/teams" | python3 -m json.tool
# Expected: 200 OK with full team list
# [
# {
# "id": 1,
# "name": "Owners",
# "description": "Admin team",
# "permission": "owner"
# },
# {
# "id": 2,
# "name": "backend-devs",
# "description": "Backend development team",
# "permission": "write"
# }
# ]
An unauthenticated attacker can:
m.Group("/:orgname", func() {
m.Get("/teams", org.ListTeams)
}, reqToken(), orgAssignment(true))
Add reqToken() middleware to the org teams route group, consistent with other authenticated org endpoints. Additionally, ListTeams() should verify the authenticated user is a member of the organization.
gogs.io/gogs < 0.14.3Upgrade to a patched release:
gogs.io/gogs 0.14.3Field changes observed since this record was first indexed.
Connected by shared product, vendor, weakness, or advisory.
CVE-2026-52806Critical· 9.9Gogs vulnerable to RCE via git rebase --exec argument injection in pull request merge
CVE-2026-52810HighGogs allows users to write to readonly repositories using receive-pack + service=git-upload-pack confusion
CVE-2026-52813Critical· 10.0Gogs has Path Traversal in organization name that results in RCE through Git hooks
CVE-2025-64719Medium· 4.9Gogs has a Denial of Service in repository/wiki file listing web pages
CVE-2026-25119HighGogs has an Authentication Bypass via Unvalidated Reverse Proxy Headers
CVE-2026-52796Low· 3.5Gogs has DoS in rendering issue index pattern