Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.3%top 75%

Gitea: Unauthenticated ReDoS via CODEOWNERS pattern matching allows denial of service (CVE-2026-58421)

0
High
Published: 07/21/2026 (07/21/2026, 20:34:33 UTC)
Source: GCVE Database
Vendor/Project: Gitea
Product: code.gitea.io/gitea

Description

Gitea versions prior to 1.26.4 contain a vulnerability in the CODEOWNERS feature where user-supplied regex patterns are compiled without sanitization or timeout, enabling a Regular Expression Denial of Service (ReDoS) attack. An attacker with a repository can craft malicious CODEOWNERS patterns and file names in pull requests that cause exponential regex backtracking, hanging the server during pull request processing. This results in database connections being held open, potentially exhausting the connection pool and making the Gitea instance unresponsive.

CVSS v3.1

Score 7.5high

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

Affected software

Affected versions
<1.26.4

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/22/2026, 01:47:18 UTC

Technical Analysis

The vulnerability in Gitea's CODEOWNERS feature arises from the use of the regexp2 library to match file paths against ownership rules without sanitization or match timeouts. User-controlled regex patterns are compiled and matched against file paths during pull request creation inside a database transaction. Malicious patterns such as '(a+)+' cause catastrophic backtracking when matched against crafted file names, leading to prolonged processing times (e.g., ~30 seconds for 11 rules). This behavior can exhaust database connections when multiple pull requests are created in parallel, resulting in denial of service. The issue affects versions prior to 1.26.4 and requires only a registered user with a repository to exploit.

Potential Impact

The vulnerability allows an attacker to cause denial of service by exhausting database connection pools through long-running regex evaluations during pull request creation. This can make the entire Gitea instance unresponsive to all users. There is no impact on confidentiality or integrity, only availability is affected.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict the ability of users to create or modify CODEOWNERS files with complex regex patterns or implement rate limiting on pull request creation to mitigate potential abuse. Monitor for updates from Gitea regarding an official fix.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
Gitea
Date Reserved
2026-06-30T18:57:20.614Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null
Gcve Source
db.gcve.eu

Threat ID: 6a483c9d27e9c79719d7f5e0

Added to database: 07/03/2026, 22:50:05 UTC

Last enriched: 07/22/2026, 01:47:18 UTC

Last updated: 07/31/2026, 19:22:59 UTC

Views: 91

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses