---
id: "CVE-2026-125617"
page: "https://infrastack.ai/live/CVE-2026-125617"
kind: "vulnerability"
aliases: ["CVE-2026-125617", "GHSA-7mr2-v9gc-4467"]
title: "User org permissions API leaks hidden org membership and role"
severity: "medium"
cvss: null
epss: null
exploited: false
status: "open"
category: "runtime"
products: [{"name": "gitea.dev", "fixed": ["28.4.0"], "affected": ">= 1.16, <= 28.3.0", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["cwe-200", "gitea", "runtime", "self-hosted"]
not_affected_if: ["default-config-public-memberships", "registration-disabled-no-users"]
published_at: "2026-11-15T21:03:18+00:00"
first_seen_at: "2026-11-15T21:12:46+00:00"
updated_at: "2026-11-15T21:14:17+00:00"
sources: [{"source": "ghsa-repo", "url": "https://github.com/go-gitea/gitea/security/advisories/GHSA-7mr2-v9gc-4467", "first_seen_at": "2026-11-15T21:12:46+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125617", "first_seen_at": "2026-11-15T22:40:23+00:00"}]
exploit_sources: []
---

# User org permissions API leaks hidden org membership and role

Link for people: https://infrastack.ai/live/CVE-2026-125617 (this .md is for agents)

Any signed-in Gitea user can check whether another user is a hidden member of a public or limited organization and what role they hold, via GET /api/v1/users/{username}/orgs/{org}/permissions. The other membership routes return the same answer for hidden members as for non-members, so this exposes membership and role metadata only.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- go:gitea.dev affected >= 1.16, <= 28.3.0 fixed 28.4.0

## How to check

- Run `gitea --version` (or check the server's version page) and compare against the affected range `>= 1.16, <= 28.3.0`.
- Check whether `[service] DEFAULT_ORG_MEMBER_VISIBLE` is set; the default is `false`, which is the concealed-membership case this bug affects.
- Confirm the instance is vulnerable by querying `GET /api/v1/users/{username}/orgs/{org}/permissions` as a non-member user with `read:user` and `read:organization` scopes and seeing a 200 response.

## Fix

- Gitea (go:gitea.dev): upgrade to `28.4.0`.

## Timeline

- 2026-11-15T21:12:46+00:00 ghsa-repo https://github.com/go-gitea/gitea/security/advisories/GHSA-7mr2-v9gc-4467
- 2026-11-15T22:40:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-125617

## Documents

- [advisory] Maintainer's advisory: github.com https://github.com/go-gitea/gitea/security/advisories/GHSA-7mr2-v9gc-4467
- [fix] Release notes: github.com https://github.com/go-gitea/gitea/releases/tag/v28.4.0

## From the sources

Any signed-in Gitea user can find out whether another user is a concealed member of a public or limited organization, and at what level, by calling `GET /api/v1/users/{username}/orgs/{org}/permissions`. The possible answers are owner, admin, write, read, or "may create repositories". The routes that normally answer membership questions for outsiders (`/orgs/{org}/members/{username}`, `/orgs/{org}/public_members/{username}` and `/users/{username}/orgs`) give a concealed member the same answer as a non-member. The permissions route tells them apart and adds the role. The attached reproducer runs a default build and queries as a user with no tie to the organization. It gets `is_owner: true` for the organization's concealed creator and `can_read: true` for a concealed read-team member, while the three membership routes return 404 / 404 / `[]` for both.

The only access check in `GetUserOrgsPermissions` (`routers/api/v1/org/org.go`) is `HasOrgOrUserVisible` on the organization. After that, the handler returns the target's `GetOrgUserMaxAuthorizeLevel`. It never consults `org_user.is_public` or whether the caller is an org member, which is the rule `IsMember`, `ListUserOrgs` and `ListMembers` apply. Because `DEFAULT_ORG_MEMBER_VISIBLE` defaults to false, new memberships start out concealed.

The caller needs an account; a token with `read:user` and `read:organization` is enough. Registration is off by default, so on a default instance this means an existing user. What leaks is membership and role only: no repository content and nothing about private organizations. Members of teams with only per-unit permissions are not revealed unless that team can create repositories. For organizations with public repositories, the assignees route already names accounts with write access. The new exposure is therefore mainly organizations without public repositories, read-only members, and exact roles.

The private-organization case of this route was fixed in 57b5ed3f25 (#36798), but the per-membership check was never added. Based on a source-level reading of the history, it has been missing since the endpoint was introduced in d0a681fbc3 (#17232), first released in v1.16.0-rc1.

## Details

`GET /api/v1/users/{username}/orgs/{org}/permissions` tells any signed-in user what role `{username}` holds in `{org}`, including when that membership is not public. Scanned commit: `31626de2a6cdd3e1fe93216e4ac80f511297f1e7`. Attacker position: a regular user with no relation to the organization. Configuration: default.

Observed on the stock build with default settings, as user `attacker`, against the public organization `victimorg` whose creator `orgowner` and team member `hiddenmember` both have `org_user.is_public = false`, and against `bystander`, who is not a member:

| request (as `attacker`) | `orgowner` | `hiddenmember` | `bystander` |
|---|---|---|---|
| `GET /orgs/victimorg/members/{user}` | 303 → `public_members` → 404 | 303 → 404 | 303 → 404 |
| `GET /orgs/victimorg/public_members/{user}` | 404 | 404 | 404 |
| `GET /users/{user}/orgs` | `[]` | `[]` | `[]` |
| `GET /users/{user}/orgs/victimorg/permissions` | 200, `is_owner: true` (all five fields true) | 200, `can_read: true` | 200, all five fields false |

The three routes that answer "is this user a member" give an outsider the same answer for a concealed member and a non-member. The permissions route separates them and adds the role.

The handler's only visibility check is on the organization:

```go
// routers/api/v1/org/org.go:157-163
	if !organization.HasOrgOrUserVisible(ctx, o, ctx.Doer) {
		ctx.APIErrorNotFound()
		return
	}

	org := organization.OrgFromUser(o)
	authorizeLevel, err := org.GetOrgUserMaxAuthorizeLevel(ctx, ctx.ContextUser.ID)
```

`GetOrgUserMaxAuthorizeLevel` (`models/organization/org.go:416`) is `max(team.authorize)` over the target's `team_user` rows in the org. Lines 169-186 translate it into `can_read` / `can_write` / `is_admin` / `is_owner` and add `can_create_repository` from `CanCreateOrgRepo`. Neither `org_user.is_public` for the target nor the caller's own membership is consulted anywhere on the path.

The route is registered at `routers/api/v1/api.go:1776-1779`. Its guards are `reqToken()`, the token scopes `read:user` and `read:organization` (a token with exactly these two scopes gets the same 200 responses), `checkTokenPublicOnly()`, and `individualPermsChecker` (`api.go:984`), which only requires that `{username}` is visible to the caller. An anonymous request gets 401.

The siblings do apply the membership rule:

- `IsMember` (`routers/api/v1/org/member.go:153-175`) answers directly only when the caller is an org member or a site admin; everyone else is redirected to `public_members`, and `IsPublicMember` (`member.go:204`) answers from `organization.IsPublicMembership`.
- `ListUserOrgs` goes through `queryUserOrgIDs` (`models/organization/org_list.go:63-69`), which adds `is_public = true` unless the caller is the user or an admin.
- `ListMembers` uses `FindOrgMembersOpts.PublicOnly()` (`models/organization/org.go:180`) to restrict non-members to public memberships.

Memberships start out concealed: both `CreateOrganization` (`models/organization/org.go:350`) and `AddOrgUser` (`org.go:532`) insert the `org_user` row with `IsPublic: setting.Service.DefaultOrgMemberVisible`, and `[service] DEFAULT_ORG_MEMBER_VISIBLE` defaults to `false` (`modules/setting/service.go:244`).

What the response reveals depends on `team.authorize`:

- The Owners team has `authorize = owner`, so every concealed owner comes back with `is_owner: true`.
- Teams with a general permission reveal their members as `can_read` / `can_write` / `is_admin`. `POST /orgs/{org}/teams` with `permission` and no `units`/`units_map` creates such a team for `read`, `write` or `admin` (`routers/api/v1/org/team.go:177-181`); the web form handler does for `write` and `admin` (`routers/web/org/teams.go:347`). Read and write teams created through the API were observed; the admin case follows from the same comparisons in the handler, and the web-form path was read from source, not run.
- Teams defined per unit have `authorize = none` (`team.go:170`, `routers/web/org/teams.go:370`). A member of only such teams returns the same all-false body as a non-member, unless the team has `can_create_org_repo`, in which case `can_create_repository: true` gives the membership away. Both cases were observed on the running server.

A limited organization behaves like a public one for a signed-in caller (observed: 200 with `is_owner: true`). A private organization returns 404 to non-members; that case was closed by 57b5ed3f25 (#36798), which made `HasOrgOrUserVisible` test the caller instead of the target. The per-membership check is the part that is still missing; it has been absent since the endpoint was added in `d0a681fbc3fb` ("[API] Add endpount to get user org permissions (#17232)", 2021-10-12), first released in v1.16.0-rc1.

## Impact

The attacker needs an account, and what leaks is membership and role metadata only: no repository content, and nothing about private organizations. Registration is disabled by default (`DISABLE_REGISTRATION` defaults to `true`, `modules/setting/service.go:148`), so on a default instance this is an existing user; on instances with open registration it is anyone.

With that, any signed-in user can test any visible username against any public or limited organization and learn whether that user is a concealed owner, or a concealed member of an admin/write/read team or of a team that may create repositories, together with that role. Iterating over usernames lists the concealed members of such an organization with their roles. This defeats the membership-visibility setting that the other organization routes enforce.

That concealment is already partial elsewhere. When the organization owns a public repository, `GET /repos/{owner}/{repo}/assignees` lists the accounts with write access to that repository to any signed-

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
