Skip to main content

Gitea CVE-2026-123002

| EUVDEUVD-2026-126121 HIGH
Improper Restriction of Excessive Authentication Attempts (CWE-307)
2026-11-15 Gitea
7.5
CVSS 3.1 · Vendor: Gitea
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain victim's account password
  2. Delivery
    Submit password, reach 2FA prompt
  3. Exploit
    Brute-force six-digit TOTP at high rate
  4. Execution
    Match valid code, obtain session
  5. Impact
    Hijack account, disable TOTP

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Brute-force prevention, rate limiting
Exploitation Conditions

Requires that the attacker already knows the target account's password AND that the account has TOTP two-factor enabled; the target must run Gitea before 28.4.0 (affected <=28.3.0). The missing rate limit is reachable on three surfaces named in the description: the interactive sign-in 2FA step (POST /user/two_factor, plus the shared scratch-code path), the password reset flow, and Basic authentication via the X-Gitea-OTP header. Exploitation is further enabled because affected versions emit no failed-2FA log line, so fail2ban cannot catch attempts, and enabling the optional login CAPTCHA does not help (it only gates the password step). Limiting factors for defenders: the password prerequisite (PR:L), 2FA must be in use, and success requires sustained high-rate requests (~333,333 guesses, ~11 minutes at 500 req/s) - making it practical for targeted credential-reuse scenarios but noisy. Updating to 28.4.0, which enforces five attempts per account before a 15-minute refusal, is the fix the vendor provides.

Impact

Signals are largely consistent and point to a real but conditional priority rather than an emergency. The provided CVSS is 7.5 High (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H): network-reachable and unattended (UI:N), but gated by PR:L because the attacker must already possess the victim's account password, and rated AC:H. The advisory grounds the mechanism: TOTP is six digits with Skew=1, so 3 of 1,000,000 codes are valid per 30s window and no attempt counter existed before 28.4.0, giving a ~333,333-guess mean (~11 min at 500 req/s) to defeat 2FA and take over the account (C:H/I:H/A:H - the attacker can then disable the victim's TOTP). EPSS is low (0.19%, 9th percentile) and the CVE is NOT in CISA KEV, indicating no evidence of mass automated exploitation; the vuln.today decision label is this_week, not act_now/emergency. The core caveat: this is only dangerous once a password is already known (credential stuffing, breach reuse, phishing), so it is best read as a 2FA-degradation flaw that removes the second factor's protection in exactly those scenarios - not a standalone unauthenticated RCE. Note AC:H here reflects the probabilistic guessing the advisory describes, not a race or timing condition.

Exploit ScenarioDerived

An attacker who already holds a victim's Gitea password (from reuse, a prior breach, or phishing) completes the password step, then scripts the 2FA endpoints and submits six-digit codes at a high rate (the advisory measured ~1,233 req/s single-client). Because affected versions apply no attempt limit, one of the three valid codes per 30-second window lands within roughly 11 minutes on average, yielding a full authenticated session after which the attacker disables the victim's TOTP. A working PoC is described in the vendor advisory (it reports a hit at 309,961 attempts), though standalone exploit code is not published as a verified artifact.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 16, 2026

Gitea before 28.4.0 exposes its TOTP second factor to unlimited guessing: an attacker who already holds a valid account password can submit wrong six-digit passcodes at high rate on the interactive sign-in step, the password reset flow, and Basic authentication using the X-Gitea-OTP header, then sign in and disable the victim's two-factor authentication once a code is hit. No KEV listing exists and EPSS is very low (0.19%, 9th percentile), but exploitation is cheap for a targeted attacker because the affected code path has no attempt counter, no throttle middleware, and emits no failed-2FA log line, so fail2ban and the optional login CAPTCHA (which gates only the password step) provide no coverage. The advisory reports a proof-of-concept run that succeeded after 309,961 guesses, and the published fix adds an account-keyed limit of five failures before a 15-minute refusal.

RemediationAI

Upgrade to Gitea 28.4.0, the version that introduces the attempt ceiling - the fix (pull requests 39993 and 40374, documented at https://github.com/go-gitea/gitea/security/advisories/GHSA-5mx6-8rwm-52wf and https://blog.gitea.com/release-of-28.4.0/) refuses further TOTP submissions for an account after five failures for 15 minutes, with the timer renewed by each new failure and the counter reset on success; users who are refused can still authenticate with a scratch code, and an empty passcode field is exempted so password-only Basic auth clients are not locked out. Be aware of the side effect: legitimate users who mistype their passcode more than five times will be denied for 15 minutes, and because the counter is keyed on the account rather than the source address, it cannot be widened by rotating IPs. No vendor workaround is documented for versions before 28.4.0, and the advisory explicitly notes that enabling the login CAPTCHA does not mitigate the issue because it gates only the password step in SignInPost, never TwoFactorPost; it also notes that affected releases emit no failed-TOTP log line on the web path, so existing fail2ban filters watching Gitea logs cover only SSH and cannot detect these attempts. For operators who cannot update immediately, the same account-keyed ceiling described in the advisory (or an equivalent limit applied in front of /user/two_factor) is the control that makes a 333,333-guess search infeasible, accepting the same temporary-lockout trade-off for account owners.

Affected VersionsENISA

Gitea 0 <28.4.0

Affected Packages

euvd gitea fix: 28.4.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is CWE-307 (improper restriction of excessive authentication attempts) in Gitea's Go codebase, specifically the TOTP validation helper TwoFactor.ValidateAndConsumeTOTP and the web handler TwoFactorPost in routers/web/auth/2fa.go. The /two_factor route group is registered with only web.Bind and no throttle middleware, and on a failed passcode the handler simply re-renders the form, leaving the twofaUid session established by the password step intact so the identical POST can be repeated indefinitely. The underlying crypto is not broken: pquerna/otp totp.Validate runs at Skew=1, so three of the 1,000,000 possible codes are valid in any 30-second window (roughly 333,333 expected guesses, about 11 minutes at 500 requests/second), and a conditional-UPDATE replay guard only prevents reusing an already-consumed passcode. The advisory notes that Gitea emits no log line on a wrong web TOTP (that format exists only in the SSH server, modules/ssh/ssh.go), and that the optional RequireCaptchaForLogin setting is never consulted by TwoFactorPost. The upstream fix (PR 39993) replaces the boolean return with a TwoFactorResult enum, wraps check-validate-count in a globallock keyed on the user ID, stores a per-account attempt counter in Gitea's cache with totpMaxAttempts=5 and totpAttemptsTTL=15 minutes renewed by every failure, and deliberately does not consume attempts when the passcode field is empty so password-only Basic auth clients are unaffected.

Know when Gitea gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (Gitea) PRIMARY 7.5 HIGH
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.5 HIGH

Attacker must already hold the victim's password (PR:L) and defeat 2FA by probabilistic high-volume guessing (AC:H); successful bypass yields full account takeover (C/I/A:H).

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (Gitea).

CVSS VectorVendor: Gitea

Attack Vector
Network
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

3
CVSS changed
Nov 16, 2026 - 22:22 NVD
7.5 (HIGH)
CVE Published
Nov 15, 2026 - 21:13 cve.org
HIGH 7.5
CVE Published
Nov 15, 2026 - 21:13 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.org

Gitea accepted an unlimited number of wrong TOTP passcodes during sign-in, in the password reset flow and for Basic authentication with the X-Gitea-OTP header. An attacker who already knows an account's password could guess the six-digit passcode by trying codes at a high rate and sign in despite two-factor authentication. After five failed passcodes, further attempts for the account are now refused for 15 minutes.

Technical POC Analysis

Bug class: CWE-307, Improper Restriction of Excessive Authentication Attempts.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

Gitea versions before 28.4.0 have a critical weakness in their two-factor authentication (2FA) that allows an attacker who already has a valid password to brute-force the one-time passcode and bypass 2FA. This enables account takeover, including the ability to disable the victim's 2FA. Given the low attack complexity (EPSS 0.2%, no known active exploitation), the risk is elevated for organizations using Gitea for source code management, as compromised accounts can lead to data breaches and supply chain attacks.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 91% exploitable
Prevalence
Medium
popular self-hosted Git service, common in dev/CI, not universal
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

More in Gitea

View all
CVE-2026-60004 CRITICAL POC
9.8

Remote code execution in Gitea (self-hosted Git service) via a code-injection flaw (CWE-94) allows attackers to run arbi

CVE-2026-27771 HIGH POC
8.2 Jul 03

Broken access control in Gitea's Composer package registry (versions up to and including 1.26.1) lets remote attackers r

CVE-2022-30781 HIGH POC
7.5 May 16

Gitea before 1.16.7 does not escape git fetch remote. Rated high severity (CVSS 7.5), this vulnerability is remotely exp

CVE-2020-14144 HIGH POC
7.2 Oct 16

The git hook feature in Gitea 1.1.0 through 1.12.5 might allow for authenticated remote code execution in customer envir

CVE-2024-6886 CRITICAL POC
10.0 Aug 06

Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Gitea Gitea

CVE-2026-72867 CRITICAL POC
9.9 Aug 10

Authenticated command injection in Dokploy (self-hostable PaaS) versions 0.29.3 through 0.29.12 lets a low-privileged us

CVE-2026-20896 CRITICAL POC
9.8 Jul 03

Reverse-proxy authentication bypass in the official Gitea Docker image (versions up to and including 1.26.2) allows any

CVE-2026-59774 CRITICAL POC
9.8

Path traversal in Gitea's Org-mode (`.org`) markup renderer allows an attacker who can get Org-mode content rendered by

CVE-2026-58053 CRITICAL POC
9.4 Jun 28

Container escape in Gitea act_runner (Docker backend, through act 0.262.0) lets an authenticated user with workflow-exec

CVE-2019-11229 HIGH POC
8.8 Apr 15

models/repo_mirror.go in Gitea before 1.7.6 and 1.8.x before 1.8-RC3 mishandles mirror repo URL settings, leading to rem

CVE-2026-57894 HIGH POC
8.5 Jul 21

Server-side request forgery and internal repository exfiltration in Gitea before 1.27.0 lets a low-privileged authentica

CVE-2026-24791 HIGH POC
8.1 Jun 17

Authorization bypass in Gitea versions 1.22.3 through 1.26.1 allows holders of `public-only` access tokens or OAuth gran

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy