CVE-2026-20912

Gitea: Cross-Repository Authorization Bypass via Release Attachment Linking Leads to Private Attachment Disclosure

Published Jan 22, 2026 CVSS 3.1 · 9.1 Critical EPSS < 1% KEV · Not listed
Description
Gitea does not properly validate repository ownership when linking attachments to releases. An attachment uploaded to a private repository could potentially be linked to a release in a different public repository, making it accessible to unauthorized users.

Analysis

AI-generated

Technical impact

Gitea fails to validate the ownership of repositories when an attachment is linked to a release. As a result, an attachment that has been uploaded to a private repository can be referenced by a release in another repository, including public ones. This flaw constitutes a cross‑repository authorization bypass (CWE‑284) and a user‑controlled input bypass (CWE‑283) that allows an attacker to obtain access to confidential data by executing the bypass. The disclosed content can be viewed or downloaded by anyone who has read access to the target public repository, thereby violating confidentiality and potentially exposing sensitive files.

Affected Systems

The advisory does not specify a vulnerable version range, so it is inferred that earlier releases may be affected, particularly those that still allow attachments from private repositories to be linked to releases in other repositories. The published fix is included in Gitea release 1.25.4 and newer, which validates repository ownership before linking attachments.

Risk and Exploitability

The vulnerability carries a CVSS score of 9.1, indicating critical severity. The EPSS score is below 1 percent, implying that, while the exploit likelihood is low, the potential damage is considerable. The flaw is not listed in the CISA KEV catalog. The attack can be carried out by an attacker who can upload an attachment to a private repository and then edit a release in a public repository to reference that attachment. The required conditions are minimal, making the attack plausible, especially in environments where privacy boundaries between repositories are not tightly enforced.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the Gitea 1.25.4 or later patch that validates repository ownership before linking attachments to releases
  • If patching is delayed, restrict the ability to link attachments from private repositories by disabling attachment linking on public repositories or through repository‑level permission settings
  • Implement an administrative review workflow for release attachments in public repositories to ensure no private content is inadvertently exposed

Generated by OpenCVE AI on August 14, 2026 at 04:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-4xx9-vc8v-87hv Gitea does not properly validate repository ownership when linking attachments to releases
History
Type Values Removed Values Added
CPEs cpe:2.3:a:gitea:gitea:*:*:*:*:*:-:*:*
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea
Vendors & Products Gitea
Gitea gitea
Type Values Removed Values Added
Description Gitea does not properly validate repository ownership when linking attachments to releases. An attachment uploaded to a private repository could potentially be linked to a release in a different public repository, making it accessible to unauthorized users.
Title Gitea: Cross-Repository Authorization Bypass via Release Attachment Linking Leads to Private Attachment Disclosure
Weaknesses CWE-284
CWE-639
References
Weaknesses
  • CWE-283

    Unverified Ownership

  • CWE-284

    Improper Access Control

  • CWE-639

    Authorization Bypass Through User-Controlled Key

Sources

Status
PUBLISHED
Assigner
Gitea
Published
Updated
Jul 15, 2026, 1:20 AM
Reserved
Jan 8, 2026, 11:02 PM
Status
Modified
Published
Jan 22, 2026, 10:16 PM
Modified
Jul 15, 2026, 2:18 AM
Severity
Critical
Public date
Jan 22, 2026, 10:01 PM