Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCapture victim's valid TOTP code
-
DeliveryReach Gitea 2FA or X-Gitea-OTP endpoint
-
ExploitReplay the same code within window
-
ExecutionBypass single-use enforcement
-
PersistAuthenticate as victim
-
ImpactAccess private repositories
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Replay attack prevention
|
| Exploitation Conditions | Exploitation requires that the target account has TOTP-based two-factor authentication enabled in Gitea and that the attacker can obtain a currently-valid TOTP code (through interception, logging, phishing relay, or shoulder-surfing) and replay it before its ~30-second time window elapses. Two code paths are affected: the interactive web two-factor authentication flow and the Basic Auth X-Gitea-OTP header path. Limiting factors: the flaw does not by itself let an attacker generate codes, so knowledge of the victim's primary password (for the login flow) plus a captured code is generally needed; the short TOTP validity window constrains the replay opportunity; and only instances running Gitea 1.5.0 through 1.26.2 with 2FA in use are affected. The CVSS UI:R reflects that a legitimate user must produce a valid code for the attacker to capture and reuse. |
| Impact | The published CVSS 3.1 score is 7.1 (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N), a network, low-complexity, no-privilege vector with confidentiality high and integrity low. In practical terms the score is optimistic on complexity: capture-replay of a TOTP requires the attacker to first obtain a currently-valid code and reuse it before its short time window expires, which is closer to a real-world AC:H condition and depends on the attacker already having some path to observe the code - so PR:N is technically correct (the attacker is not authenticated) but exploitation is gated by a prerequisite the base metrics understate. There is no EPSS score, no POC, and no KEV listing provided, so no evidence of active or automated exploitation exists; this reads as a defense-in-depth weakening of 2FA rather than a directly weaponizable remote flaw. Priority is moderate: patch it as part of normal maintenance, elevated only for internet-exposed Gitea instances handling sensitive repositories. Note the conflict to verify: the vector implies easy network exploitation, but the capture-replay root cause implies the attacker must already have access to a live code - treat the raw 7.1 as an upper bound. |
| Exploit ScenarioDerived | An attacker who can observe a victim's live TOTP code - for example by intercepting a request, reading it from a proxy or application log, or capturing it during a phishing relay - resubmits that same code to Gitea's web 2FA form or via the X-Gitea-OTP header on the Basic Auth endpoint while it is still within its validity window. Because Gitea does not reject the already-used code, the replay succeeds and the attacker completes second-factor authentication as the victim. No public POC is identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 03, 2026
TOTP two-factor authentication replay in Gitea 1.5.0 through 1.26.2 lets a captured valid one-time code be accepted multiple times instead of being invalidated after first use, weakening 2FA on both the web login flow and the Basic Auth X-Gitea-OTP header path. An attacker who observes a legitimate TOTP code (via interception, shoulder-surfing, or logging) can replay it within its validity window to authenticate as the victim. There is no public exploit identified at time of analysis and it is not listed in CISA KEV; the flaw is fixed in Gitea 1.26.3.
RemediationAI
Vendor-released patch: upgrade to Gitea 1.26.3 (or the later 1.26.4) per the vendor advisory GHSA-gx3v-q759-g323 and release notes at https://blog.gitea.com/release-of-1.26.3-and-1.26.4/; the code fix is in pull request https://github.com/go-gitea/gitea/pull/38151. As the primary and definitive fix, upgrade the Gitea binary/container to 1.26.3+ following the standard upgrade procedure. If immediate patching is not possible, compensating controls include restricting network exposure of the Gitea instance to trusted networks or VPN to limit who can present a replayed code, terminating TLS correctly and enforcing HTTPS everywhere to reduce opportunities to capture codes in transit (trade-off: does not stop capture at the endpoint or via logs), and - for high-value accounts - temporarily disabling the Basic Auth X-Gitea-OTP path or programmatic access if not required (trade-off: breaks CI/CD or scripted clients that rely on it). These are stopgaps only; the code reuse defect is closed only by the upgrade.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Gitea is a self-hosted, open-source Git service (a lightweight GitHub/GitLab alternative) written in Go. The affected component is its time-based one-time password (TOTP, RFC 6238) second-factor implementation. TOTP codes are meant to be single-use: once a code is consumed for authentication it must be marked as spent so it cannot be presented again during the ~30-second window in which it remains cryptographically valid. This CVE maps to CWE-294 (Authentication Bypass by Capture-replay): Gitea failed to record and reject already-used codes consistently, so the same code passed validation more than once. The defect spans two distinct entry points - the interactive web 2FA flow and the programmatic Basic Auth path that reads the code from the X-Gitea-OTP HTTP header - indicating the missing single-use enforcement was in shared verification logic rather than a single UI handler. The single affected CPE is cpe:2.3:a:gitea:gitea_open_source_git_server.
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:L/PR:N/UI:R/S:U/C:H/I:L/A:N
Attacker must capture a live TOTP code and replay it within its short window, so AC:H; no auth needed by attacker (PR:N) but victim must generate a code (UI:R), yielding account takeover (C:H, I:L).
Primary rating from Vendor (Gitea).
CVSS VectorVendor: Gitea
DescriptionCVE.org
Gitea versions from 1.5.0 before 1.26.3 have a TOTP single-use enforcement defect that allows a valid TOTP code to be accepted more than once across web two-factor authentication flows and the Basic Auth X-Gitea-OTP path.
Executive ViewAI
Gitea repository management systems running versions 1.5.0 through 1.26.2 contain a two-factor authentication bypass vulnerability (no public exploit identified at time of analysis) that allows attackers to replay captured TOTP codes for unauthorized repository access. This directly undermines access controls protecting source code and development infrastructure across affected deployments. Organizations must patch to version 1.26.3 immediately to restore authentication integrity and reduce breach risk.
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
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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
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
An issue was discovered in Gitea through 1.11.5. Rated high severity (CVSS 7.5), this vulnerability is remotely exploita
Same weakness CWE-294 – Authentication Bypass by Capture-replay
View allSame technique Information Disclosure
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-41613
GHSA-gx3v-q759-g323
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB