/

CVE-2026-25712

Severity:

HIGH RISK

(7.5)

Access Control Flaw (CWE-284) in Gitea Org APIs

CVE-2026-25712

Deferred

Vulnerability type

Category:

Access Control / Authorization

CWE:

CWE-284

Impact:

Information Disclosure of Hidden Membership and Orgs

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Gitea organization permission APIs before version 1.25.5 contain an access control weakness that fails to fully enforce visibility rules for hidden members and private organizations.

Under certain conditions, this can expose membership or organizational metadata to users who should not have visibility into those entities.

Affected context

The issue appears in Gitea deployments that use organizations with private visibility settings or hidden members.

It manifests specifically in organization-related permission or membership APIs where the backend assumes the caller's access level is already filtered, but does not consistently re-check visibility rules.

Environments that rely on private organizations to segregate projects or use hidden memberships for privacy are more likely to be affected.

Exploit preconditions

  • Attack surface: Gitea HTTP API endpoints related to organization permissions and membership.
  • Required access: Ability to authenticate or reach organization permission APIs (often as a regular user or authenticated account).
  • Trigger point: Invoking APIs that return organization or membership data without triggering full visibility checks for hidden members or private organizations.
  • Why exploitation is possible: The authorization logic does not consistently enforce visibility constraints, allowing some details about hidden members or private organizations to be inferred or directly retrieved by users lacking appropriate permissions.

Why this happens

This vulnerability stems from incomplete or improperly enforced authorization checks, mapping to CWE-284: Improper Access Control.

The affected APIs appear to rely on partial context (such as organization membership or role) without re-validating whether the requester is entitled to see private organizations or hidden members.

As a result, sensitive metadata can be exposed through API responses even though the UI or higher-level logic intends to keep these entities hidden.

Potential impact

  • Unauthorized users may learn that a private organization exists.
  • Hidden member identities or membership status could be revealed.
  • Internal project structure and collaboration patterns might be inferred.
  • Privacy expectations for users relying on hidden membership can be undermined.

General mitigation guidance

Mitigation generally focuses on strengthening and centralizing authorization checks around sensitive visibility states.

Useful defensive patterns include:

  • Enforcing a single, reusable authorization layer for all organization and membership endpoints, including checks for private and hidden entities.
  • Applying default-deny logic where visibility is explicitly granted rather than assumed.
  • Reducing reliance on client-side filtering by ensuring that server-side handlers return only data the caller is authorized to see.
  • Segmenting organization and membership data based on visibility flags so that private and hidden objects are excluded early in query logic unless access is explicitly validated.

How teams detect issues like this

Detection typically involves reviewing API authorization flows and verifying that all organization- and membership-related endpoints consistently apply visibility checks.

Static analysis and code review can focus on:

  • Endpoints touching organization membership, roles, and visibility flags.
  • Bypassed or duplicated authorization paths where some predicates are missing.

Automated tests that simulate users with different roles and visibility levels can help detect leaks by comparing expected versus actual API responses.

Policy enforcement tools or middleware that logs access to private organizations and hidden members can also reveal unintended exposure patterns over time.

Sources

SourceLink
blog.gitea.comblog.gitea.com/release-of-1.25.5/
github.comgithub.com/go-gitea/gitea/pull/36798
github.comgithub.com/go-gitea/gitea/pull/36841
github.comgithub.com/go-gitea/gitea/releases/tag/v1.25.5

Frequently asked

questions

Exploitation is scoped to users who can reach the affected organization APIs.

It does not grant full repository access, but can expose information about private organizations or hidden members that should otherwise remain concealed.

Typically, only basic access to the Gitea instance and ability to call the relevant APIs is required.

High-privilege roles are not strictly necessary; even lower-privileged or standard users may observe data they should not see if they can query the impacted endpoints.

The most robust pattern is to centralize authorization and visibility checks so that every organization or membership API consults a common function that enforces private organization and hidden member rules.

Applying a strict default-deny policy and verifying visibility for every response path helps remove inconsistent checks.

Design APIs so that authorization decisions are made in a shared layer, add regression tests for visibility scenarios, and adopt code review checklists that explicitly ask whether each endpoint enforces both permission and visibility constraints.

Combining these with automated tests and static rules that flag direct data access without a prior authorization call reduces the chance of similar access control gaps.

Find out what's already
exploitable in your codebase.