Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-110311 Overview
CVE-2026-110311 is an information disclosure vulnerability in Gitea, the self-hosted Git service. When a user created a draft release through the API, the response built an assets list from a release without an ID. That query matched every attachment not linked to a release, including attachments on issues and comments in repositories the caller could not read.
The exposed metadata included file names, UUIDs, upload timestamps, sizes, and download counts. The flaw also leaked data about abandoned uploads across the instance. The issue is tracked as CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Critical Impact
Any authenticated user with permission to create a draft release in any repository could enumerate attachment metadata from private repositories across the Gitea instance.
Affected Products
- Gitea self-hosted Git service
- Gitea versions prior to v28.2.0
- Deployments exposing the releases API to authenticated users
Discovery Timeline
- 2026-10-18 - CVE-2026-110311 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-110311
Vulnerability Analysis
The vulnerability resides in Gitea's release creation API handler. When a draft release was created, the server constructed the response payload by querying associated attachments. The query filter used the release ID to match linked assets, but a draft release built in memory had no ID assigned at that point.
As a result, the attachment lookup matched any attachment whose release_id field was empty. In Gitea's data model, that condition matches issue attachments, comment attachments, and orphaned uploads across every repository on the instance. The caller required only write access to a single repository, which is enough to invoke the draft release endpoint.
The exposed data is metadata rather than file contents. However, UUIDs returned in the response can be used to construct direct download URLs for attachments the user should not access, depending on the attachment access control path.
Root Cause
The root cause is a missing filter condition in the attachment query. The code assumed a valid, non-zero release ID would be present when building the assets list. No defensive check rejected the zero-value ID, so the database query degenerated into a broad match on unlinked attachments. See Gitea Pull Request #39743 and Gitea Pull Request #39752 for the corrective changes.
Attack Vector
An authenticated attacker with write access to any repository calls the create-release API with the draft flag set. The server responds with a JSON body containing an assets array populated with attachment metadata from across the instance. The attacker parses the response to enumerate file names, upload times, and UUIDs belonging to repositories they cannot read. No code execution is required, and the request pattern matches normal API usage.
See the GitHub Security Advisory GHSA-8j56-f865-gqq2 for the vendor description.
Detection Methods for CVE-2026-110311
Indicators of Compromise
- API POST requests to /api/v1/repos/{owner}/{repo}/releases with draft: true returning unusually large assets arrays
- Response payloads containing attachment UUIDs not associated with any release in the target repository
- Repeated draft release creation calls from a single account across short time windows
Detection Strategies
- Review Gitea access logs for high-volume draft release API calls, particularly from low-privilege service accounts
- Correlate release creation events with subsequent attachment download requests that reference UUIDs from unrelated repositories
- Compare attachment UUIDs returned in release responses against the database to identify cross-repository leakage
Monitoring Recommendations
- Enable verbose API request logging on Gitea instances and ship logs to a centralized store for retention and search
- Alert on draft release API responses exceeding a baseline assets count, which indicates the vulnerable code path was hit
- Audit user accounts with repository write access on multi-tenant Gitea deployments to limit the blast radius
How to Mitigate CVE-2026-110311
Immediate Actions Required
- Upgrade Gitea to version v28.2.0 or later on all self-hosted instances
- Review API audit logs for prior exploitation attempts and identify which attachment UUIDs may have been exposed
- Rotate or re-upload sensitive issue and comment attachments if logs suggest exposure
Patch Information
The fix is included in Gitea Release v28.2.0. Patch details are documented in Gitea Pull Request #39743 and Gitea Pull Request #39752. Release notes are available in the Gitea Blog Release Announcement.
Workarounds
- Restrict repository write permissions to trusted users until the upgrade is applied
- Place the Gitea API behind an authenticated reverse proxy that enforces rate limits on release creation endpoints
- Disable or restrict issue and comment attachment uploads on sensitive repositories to minimize data available for enumeration
# Upgrade Gitea on a systemd-based deployment
systemctl stop gitea
# Download the v28.2.0 binary from the official release page and replace the existing binary
mv /usr/local/bin/gitea /usr/local/bin/gitea.bak
cp gitea-28.2.0-linux-amd64 /usr/local/bin/gitea
chmod +x /usr/local/bin/gitea
systemctl start gitea
systemctl status gitea
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

