Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain victim's account password
-
DeliverySubmit password, reach 2FA prompt
-
ExploitBrute-force six-digit TOTP at high rate
-
ExecutionMatch valid code, obtain session
-
ImpactHijack 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
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).
Primary rating from Vendor (Gitea).
CVSS VectorVendor: Gitea
Lifecycle Timeline
3DescriptionCVE.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
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.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Remote code execution in Gitea (self-hosted Git service) via a code-injection flaw (CWE-94) allows attackers to run arbi
Broken access control in Gitea's Composer package registry (versions up to and including 1.26.1) lets remote attackers r
Gitea before 1.16.7 does not escape git fetch remote. Rated high severity (CVSS 7.5), this vulnerability is remotely exp
The git hook feature in Gitea 1.1.0 through 1.12.5 might allow for authenticated remote code execution in customer envir
Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Gitea Gitea
Authenticated command injection in Dokploy (self-hostable PaaS) versions 0.29.3 through 0.29.12 lets a low-privileged us
Reverse-proxy authentication bypass in the official Gitea Docker image (versions up to and including 1.26.2) allows any
Path traversal in Gitea's Org-mode (`.org`) markup renderer allows an attacker who can get Org-mode content rendered by
Container escape in Gitea act_runner (Docker backend, through act 0.262.0) lets an authenticated user with workflow-exec
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
Server-side request forgery and internal repository exfiltration in Gitea before 1.27.0 lets a low-privileged authentica
Authorization bypass in Gitea versions 1.22.3 through 1.26.1 allows holders of `public-only` access tokens or OAuth gran
EUVD-2026-126121
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB