CVE-2026-20912
Gitea vulnerability analysis and mitigation

Overview

CVE-2026-20912 is an improper access control vulnerability in Gitea that allows attackers to link attachments uploaded to a private repository to a release in a different public repository, making those attachments accessible to unauthorized users. It affects all Gitea versions prior to 1.25.4. The vulnerability was published on January 22, 2026, with patches merged on January 12, 2026, and the fixed release issued on January 22, 2026. The CVSS v3.1 base score is 9.1 (Critical) per Feedly's assessment, though the GitHub Advisory Database rates it as Moderate (5.1 CVSS v4) (GitHub Advisory, Gitea Release).

Technical details

The root cause is insufficient validation of repository ownership when linking attachments to releases, classified as CWE-284 (Improper Access Control) and CWE-639 (Authorization Bypass Through User-Controlled Key). When a user uploads an attachment to a private repository and then links it to a release in a different, public repository, Gitea fails to verify that the attachment belongs to the target repository. The fix, implemented in pull requests #36320 and #36355, adjusts the position of the repository ownership check in routers/web/repo/attachment.go and adds corresponding tests (GitHub PR #36320, GitHub Advisory).

Impact

Successful exploitation allows unauthorized users to access files and attachments from private repositories by viewing them through a public repository's release page, bypassing all access controls on the private repository. This can expose sensitive project data, credentials, proprietary source code, or other confidential content that was intended to remain private. There is no availability impact, but both confidentiality and integrity are affected, as an attacker can also manipulate which attachments appear in public releases (GitHub Advisory, Feedly).

Exploitability

There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation at this time. The EPSS score is approximately 0.017–0.021%, indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been reported (GitHub Advisory).

Exploitation steps

  1. Identify a target Gitea instance: Locate a Gitea deployment running a version prior to 1.25.4 that hosts both private and public repositories.
  2. Obtain access to a private repository: The attacker must have at least write access to a private repository (e.g., via a legitimate account or compromised credentials).
  3. Upload an attachment to the private repository: Use Gitea's attachment upload functionality to upload a sensitive file (e.g., a configuration file with credentials) to the private repository.
  4. Link the attachment to a public repository release: When creating or editing a release in a public repository, reference the attachment UUID/ID from the private repository. Because Gitea does not validate repository ownership at this step, the attachment is accepted.
  5. Access the exposed attachment: Any unauthenticated or unauthorized user can now download the private repository's attachment via the public release page, bypassing all private repository access controls (GitHub Advisory, GitHub PR #36320).

Indicators of compromise

  • Logs: Gitea access logs showing attachment UUIDs from private repositories being referenced in release creation or edit API calls for public repositories; cross-repository attachment linking events in audit logs.
  • Application Behavior: Release pages on public repositories displaying attachments that were originally uploaded to private repositories; unexpected attachment associations visible in release metadata.
  • Network: Unusual download requests for attachment files from users who do not have access to the originating private repository.

Mitigation and workarounds

Upgrade Gitea to version 1.25.4 or later, which includes the fix for this vulnerability via backported pull requests #36320 and #36355. No configuration-based workaround is available; patching is the only remediation. As an interim measure, administrators should review recent release activity and audit attachment associations across repositories with differing visibility levels, and consider restricting write access to sensitive private repositories until the upgrade is applied (Gitea Release, GitHub Advisory).

Community reactions

The Gitea project addressed the vulnerability as part of a broader security-focused patch release (v1.25.4), which included eight security fixes. The release was well-received by the community, with positive reactions on GitHub. No significant independent researcher commentary or major media coverage has been identified beyond standard vulnerability database entries and the official Gitea blog release announcement (Gitea Blog, Gitea Release).

Additional resources


SourceThis report was generated using AI

Related Gitea vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-60004CRITICAL9.8
  • Gitea logoGitea
  • gitea
YesYesAug 26, 2026
CVE-2026-46603HIGH7.5
  • Tailscale logoTailscale
  • pdfcpu
NoYesAug 14, 2026
CVE-2026-56862HIGH7.5
  • cAdvisor logocAdvisor
  • cilium-cli
NoYesAug 13, 2026
CVE-2026-56859HIGH7.5
  • cAdvisor logocAdvisor
  • flux-2.6
NoYesAug 13, 2026
CVE-2026-56860MEDIUM5.9
  • cAdvisor logocAdvisor
  • cilium-1.19
NoYesAug 13, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management