Skip to main content

Gitea EUVDEUVD-2026-41628

| CVE-2026-26232 CRITICAL
Authentication Bypass by Capture-replay (CWE-294)
2026-07-03 Gitea GHSA-5v69-g2m3-3hq3
9.1
CVSS 3.1 · Vendor: Gitea
View

Attack ChainAIDerived

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

  1. Access
    Capture victim's OAuth2 authorization code
  2. Delivery
    Identify vulnerable Gitea token endpoint
  3. Exploit
    Replay code at token exchange
  4. Execution
    Bypass expiry and single-use checks
  5. Persist
    Receive access token for victim
  6. Impact
    Access victim repositories and data

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Replay attack prevention
Exploitation Conditions

Exploitation requires the attacker to first obtain a valid OAuth2 authorization code issued by a vulnerable Gitea (before 1.25.5) acting as an OAuth2 provider - codes could be redeemed after their intended lifetime and/or reused more than once because expiry and single-use were not enforced at token exchange. Limiting factors: the target Gitea instance must have the OAuth2 authorization-code provider in use with at least one registered client; the attacker must capture a code that would otherwise be protected in transit by TLS and bound to a registered redirect URI (obtained via header/log leakage, an open redirect, a malicious/compromised client, or interception); and the enlarged window is bounded - the code is not literally eternal in all paths but the missing checks remove the intended short expiry and one-time guarantee. This is not remote-unauthenticated-against-default-config exploitation because a captured code is a prerequisite.

Impact

The signals conflict and should be weighed rather than taken at face value. The vendor CVSS of 9.1 (AV:N/AC:L/PR:N/UI:N, C:H/I:H) and SSVC 'technical impact: total, automatable: yes' argue for high severity because a successful replay yields full account/token access with no privileges. However, EPSS is only 0.17% (6th percentile) and CISA SSVC exploitation status is 'none' - there is no evidence of active exploitation and no public PoC identified. Crucially, the CVSS AC:L rating understates the real precondition: an attacker must first OBTAIN a valid authorization code, which normally traverses TLS and a registered redirect URI, so capture typically requires code leakage (referer headers, logs, open redirects, a malicious/compromised client, or network interception). Once a code is captured, the missing expiry and single-use checks make redemption trivial and reliable, so this is a genuine defense-in-depth gap worth patching promptly, but it is not a mass, internet-scannable RCE. Treat as an important patch for internet-facing Gitea acting as an OAuth2/SSO identity provider, prioritized below actively-exploited KEV items.

Exploit ScenarioDerived

An attacker obtains a victim's OAuth2 authorization code - for example via a leaked Referer header, server or proxy logs, or a partially-compromised OAuth client - and, because Gitea does not reliably expire or invalidate the code, replays it against the token endpoint to obtain a valid access token for the victim's Gitea account, gaining read/write access to that user's repositories and data. The high technical impact and 'automatable' SSVC rating mean redemption can be scripted once a code is captured; no public exploit code is currently identified.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
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 – Jul 22, 2026

Authentication bypass via OAuth2 authorization code replay in Gitea before 1.25.5, where the server fails to consistently enforce code expiry and single-use during the token-exchange step, letting an attacker who obtains a valid authorization code redeem it (potentially more than once, and after it should have expired) to mint access tokens for a victim's account. The source fix confirms authorization codes previously had no enforced 10-minute validity window and that double-redemption was not reliably detected. EPSS is low (0.17%, 6th percentile) and CISA SSVC lists exploitation status as none, but SSVC rates the technical impact as total and marks it automatable; no public exploit identified at time of analysis.

RemediationAI

Vendor-released patch: upgrade to Gitea 1.25.5 or later, which enforces a 10-minute authorization-code validity window and reliable single-use invalidation (fixes in https://github.com/go-gitea/gitea/pull/36797 and https://github.com/go-gitea/gitea/pull/36851; release https://github.com/go-gitea/gitea/releases/tag/v1.25.5, notes https://blog.gitea.com/release-of-1.25.5/). If you cannot upgrade immediately, reduce exposure of authorization codes: ensure all OAuth2 clients use exact-match HTTPS redirect URIs and PKCE so intercepted codes are harder to redeem, review and rotate any OAuth2 client secrets, and audit access logs/token grants for suspicious repeated code exchanges - noting these controls lower but do not eliminate replay risk. As a stronger interim measure, disable or restrict Gitea's OAuth2 provider for untrusted third-party applications until the upgrade is applied, accepting that this breaks dependent SSO/integrations. Confirm the fix by verifying the running build reports version 1.25.5+.

Affected VersionsENISA

Gitea Open Source Git Server 0 <1.25.5

Affected Packages

go code.gitea.io/gitea fix: 1.25.5
euvd gitea_open_source_git_server fix: 1.25.5

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

The flaw lives in Gitea's built-in OAuth2 authorization-code provider (models/auth/oauth2.go and routers/web/auth/oauth2_provider.go). In the OAuth2 authorization-code grant (RFC 6749 §4.1.2), the authorization code is a short-lived, one-time bearer credential exchanged at the token endpoint for an access token. CWE-294 (Authentication Bypass by Capture-replay) is the root-cause class: Gitea did not stamp codes with an expiry (ValidUntil) and did not treat a code as consumed once used, so a captured code remained valid indefinitely and could be replayed. The patch introduces oauth2AuthorizationCodeValidity = 10 minutes, an IsExpired() check that rejects and invalidates stale codes, and changes Invalidate() to inspect the affected-row count so a second redemption returns ErrOAuth2AuthorizationCodeInvalidated (invalid_grant). The single affected CPE is cpe:2.3:a:gitea:gitea_open_source_git_server, a self-hosted Go-based Git service.

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 9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 7.4 HIGH

Network vector but AC:H because the attacker must first capture a valid, TLS-protected authorization code; no privileges needed to replay it, yielding high confidentiality and integrity impact and no availability impact.

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

Primary rating from Vendor (Gitea).

CVSS VectorVendor: Gitea

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

Lifecycle Timeline

2
CVE Published
Jul 03, 2026 - 20:19 cve.org
CRITICAL 9.1
CVE Published
Jul 03, 2026 - 20:19 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.org

Gitea versions before 1.25.5 do not consistently enforce OAuth2 authorization code expiry and single-use behavior during token exchange.

Executive ViewAI

Why It Matters

Gitea versions prior to 1.25.5 contain an OAuth2 authorization code validation defect that allows attackers to reuse authorization codes to mint access tokens for victim accounts without compromising credentials. This authentication bypass directly threatens any organization relying on Gitea for repository access control and poses material risk of unauthorized access to source code and development assets.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Prevalence
Medium
popular self-hosted Git server, moderate but not ubiquitous enterprise footprint
Threat Intel
1
1 sources
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

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 CRITICAL
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
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
Out-of-Cycle
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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-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

CVE-2020-13246 HIGH POC
7.5 May 20

An issue was discovered in Gitea through 1.11.5. Rated high severity (CVSS 7.5), this vulnerability is remotely exploita

Vendor StatusVendor

SUSE

Severity: Critical

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