GHSA-prr9-9mp4-5gp2

Suggest an improvement
Source
https://github.com/advisories/GHSA-prr9-9mp4-5gp2
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-prr9-9mp4-5gp2/GHSA-prr9-9mp4-5gp2.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-prr9-9mp4-5gp2
Aliases
  • CVE-2026-58427
Published
2026-07-21T21:49:00Z
Modified
2026-07-21T22:00:24.808637594Z
Summary
Gitea: Private org member list leaked via /members API endpoint — incomplete fix for PR #38145
Details

Summary

PR #38145 fixed ListPublicMembers and IsPublicMember but missed ListMembers. Any authenticated user can enumerate ALL members (not just public ones) of a private organization.

Affected Versions

<= v1.26.4 (latest) and main branch

Root Cause

routers/api/v1/org/member.go — ListMembers():

// Missing check: if !organization.HasOrgOrUserVisible(ctx, ctx.Org.Organization.AsUser(), ctx.Doer) { ctx.APIErrorNotFound() return }

Proof of Concept

Setup: privateorg (private), alice = member, bob = outsider

Bob lists ALL members of private org

curl -s "http://gitea/api/v1/orgs/privateorg/members" \ -H "Authorization: token BOB_TOKEN"

Result: HTTP 200

[{"login":"alice","email":"alice@test.com",...}]

Expected: HTTP 404

Note

This is an incomplete fix variant of PR #38145. That PR fixed public_members endpoints only. ListMembers (/orgs/{org}/members) remains unpatched.

Fix

Add to ListMembers(): if !organization.HasOrgOrUserVisible(ctx, ctx.Org.Organization.AsUser(), ctx.Doer) { ctx.APIErrorNotFound() return }

Database specific
{
    "github_reviewed_at": "2026-07-21T21:49:00Z",
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-200",
        "CWE-863"
    ],
    "severity": "MODERATE",
    "github_reviewed": true
}
References

Affected packages

Go / gitea.dev

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.27.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-prr9-9mp4-5gp2/GHSA-prr9-9mp4-5gp2.json"