Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Network-reachable, no auth (PR:N), exposes only team metadata so confidentiality impact is Low, no integrity or availability impact.
Primary rating from Vendor (https://github.com/gogs/gogs).
CVSS VectorVendor: https://github.com/gogs/gogs
Lifecycle Timeline
3DescriptionCVE.org
Summary
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.
Affected Versions
Gogs (all current versions)
Vulnerability Details
Root Cause: Missing reqToken() middleware on org teams route group
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 authAttack Chain
- Attacker sends
GET /api/v1/orgs/target-org/teamswith no authentication orgAssignment(true)loads the organization but does not check authListTeams()queries all teams and returns them- Response includes team IDs, names, descriptions, and permission levels (read/write/admin/owner)
Proof of Concept
# 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"
# }
# ]Impact
An unauthenticated attacker can:
- Enumerate all teams within any organization, including private/internal teams
- Discover team permission levels (read/write/admin/owner), aiding privilege escalation planning
- Map organizational structure and identify high-value targets (admin/owner teams)
- Harvest team IDs for use in other API calls that may have weaker authorization checks
Suggested Remediation
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.
AnalysisAI
Unauthenticated organization team enumeration in Gogs exposes team IDs, names, descriptions, and permission levels (read/write/admin/owner) to any network-accessible caller without credentials. All versions prior to 0.14.3 are affected - the GET /api/v1/orgs/:orgname/teams endpoint was placed in a route group missing the reqToken() middleware, meaning the orgAssignment(true) middleware loads the org object but enforces no authentication. A publicly available proof-of-concept demonstrates exploitation via a single unauthenticated curl command. No KEV listing is present, but the low attack complexity and zero authentication requirement make this a meaningful reconnaissance aid for follow-on attacks against Gogs installations.
Technical ContextAI
Gogs is a self-hosted Git service written in Go. Its API routing layer uses the Macaron web framework, where middleware is chained per route group. The root cause (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) is a missing reqToken() middleware call on the /:orgname group that handles /teams. The orgAssignment(true) middleware correctly resolves the organization object by name but performs no authentication gate - it is purely a data-loading helper. The ListTeams() handler at internal/route/api/v1/org_team.go:8 calls database.GetTeamsByOrgID() unconditionally with no c.IsLogged or membership check. The affected package is gogs.io/gogs (Go module), versions less than 0.14.3 per the GHSA advisory and confirmed CPE data.
RemediationAI
Upgrade to Gogs v0.14.3, which applies the one-line fix from PR #8336 (commit 2ebc0e27069deade992219e10a89fbc44bec8bb9) adding reqToken() middleware to the org teams route group. The patched release is at https://github.com/gogs/gogs/releases/tag/v0.14.3. If immediate upgrade is not possible, a compensating control is to place the Gogs API behind a network perimeter that restricts unauthenticated external access to /api/v1/orgs/*/teams - for example, via a reverse proxy ACL or WAF rule blocking unauthenticated requests to that path pattern. This has the trade-off of potentially disrupting legitimate API integrations if those integrations incorrectly assume no authentication is needed. The GHSA advisory also recommends that ListTeams() internally verify the authenticated user is a member of the queried organization, which is an additional defense-in-depth improvement beyond the middleware fix.
Same weakness CWE-200 – Information Exposure
View allSame technique Privilege Escalation
View allVendor StatusVendor
SUSE
Severity: Moderate| 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 |
| openSUSE Leap 15.6 | Affected |
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-39061
GHSA-744x-3838-5r56