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-95112 Overview
CVE-2026-95112 is an algorithmic complexity vulnerability in Gitea, a self-hosted Git service. When processing issue and comment bodies, Gitea rescans the entire preceding text for action keywords such as closes or fixes once per Markdown link. This design results in processing time that grows quadratically with input size. An authenticated user who can submit issues or comments can send a crafted body of approximately 1 MB that keeps a CPU core occupied for several minutes while holding a database transaction open. Gitea addressed the issue in release v28.0.0.
Critical Impact
Authenticated attackers can trigger sustained CPU exhaustion and long-held database transactions by posting a single crafted comment, degrading service availability for other users.
Affected Products
- Gitea versions prior to v28.0.0
- Self-hosted Gitea instances accepting authenticated issue or comment submissions
- Deployments exposing issue tracking to untrusted users
Discovery Timeline
- 2026-10-06 - CVE-2026-95112 published to NVD
- 2026-10-07 - Last updated in NVD database
Technical Details for CVE-2026-95112
Vulnerability Analysis
The vulnerability is an algorithmic complexity flaw in the Markdown processing pipeline for Gitea issues and comments. Gitea parses issue bodies to identify closing keywords such as closes, fixes, and resolves that link commits or references to issues.
For each Markdown link encountered in a body, Gitea rescans the entire preceding text to locate these action keywords. Processing cost therefore scales with O(n*m), where n is the body length and m is the number of links. For a body with many links, this behavior becomes effectively quadratic in input size.
A body of roughly 1 MB containing many links can occupy a CPU core for several minutes. The parsing occurs inside a database transaction, so the transaction remains open throughout processing. This blocks dependent database operations and amplifies the availability impact beyond raw CPU consumption.
Root Cause
The root cause is inefficient keyword scanning in the issue body processor. The parser does not cache or index previously scanned text, so each Markdown link triggers a full re-scan from the start of the body. This is a classic resource exhaustion pattern driven by algorithmic complexity rather than a memory safety defect.
Attack Vector
Exploitation requires an authenticated account with permission to submit issues or comments. The attacker crafts a Markdown payload approximately 1 MB in size, containing a large number of links interleaved with content that resembles action keyword candidates. Submitting the comment triggers prolonged CPU usage on the Gitea server and holds a database transaction open throughout processing. Repeated submissions can exhaust worker capacity and degrade availability for all users of the instance.
Technical details are documented in GitHub Security Advisory GHSA-467c-4w7p-8427 and the corresponding Gitea Pull Request #39396.
Detection Methods for CVE-2026-95112
Indicators of Compromise
- Sustained high CPU utilization on Gitea web or worker processes immediately after issue or comment submissions.
- Long-running database transactions originating from issue or comment creation endpoints.
- HTTP POST requests to issue or comment endpoints carrying bodies approaching or exceeding 1 MB.
- Spikes in request latency affecting unrelated Gitea operations during payload processing.
Detection Strategies
- Monitor Gitea application logs for issue and comment POST requests with unusually large payload sizes.
- Track database transaction duration metrics and alert on transactions exceeding normal thresholds for issue creation.
- Baseline CPU usage per request type and alert on outliers tied to issue tracker endpoints.
Monitoring Recommendations
- Enable request-size logging at the reverse proxy and alert on bodies larger than a defined threshold such as 256 KB.
- Correlate authenticated user actions with CPU and database latency spikes to identify abusive accounts.
- Review audit logs for repeated large comment submissions from the same user or IP address.
How to Mitigate CVE-2026-95112
Immediate Actions Required
- Upgrade Gitea to v28.0.0 or later, which contains the fix referenced in Gitea Pull Request #39396.
- Restrict issue and comment creation to trusted users on sensitive instances until the upgrade is applied.
- Enforce request body size limits at the reverse proxy to reject oversized comment submissions.
Patch Information
Gitea released the fix in Gitea Release v28.0.0. The Gitea Blog Release Announcement describes the upgrade. Administrators should review release notes before upgrading production instances.
Workarounds
- Place Gitea behind a reverse proxy such as nginx or Caddy and cap request body size for issue and comment endpoints.
- Disable anonymous or self-service account registration to limit the pool of users who can trigger the issue.
- Apply rate limiting on issue and comment creation endpoints to reduce the impact of repeated abuse.
# Example nginx body size limit for Gitea issue and comment endpoints
location ~ ^/[^/]+/[^/]+/issues {
client_max_body_size 256k;
proxy_pass http://gitea_backend;
}
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

