Skip to main content

Gitea CVE-2026-26247

| EUVDEUVD-2026-41629 CRITICAL
Improper Access Control (CWE-284)
2026-07-03 Gitea GHSA-m5ch-ppfx-xv3v
9.1
CVSS 3.1 · Vendor: Gitea
View

Attack ChainAIDerived

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

  1. Access
    Register or abuse OAuth2 public client
  2. Delivery
    Induce victim to authorize app
  3. Exploit
    Intercept issued authorization code
  4. Execution
    Redeem code without PKCE verifier
  5. Impact
    Obtain access token for victim account

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Access control enforcement
MITRE ATT&CK

1 technique across 1 tactic: Defense Evasion

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target Gitea instance is acting as an OAuth2/OIDC provider and that a client initiates an authorization-code flow using the S256 PKCE challenge method; the attacker must be able to obtain the resulting authorization code (via a malicious registered client, redirect-URI leakage, or interception of a public client's callback) before it is legitimately redeemed. The limiting factor is that PKCE is a protection against code interception - so an attacker who has NO way to capture an authorization code gains nothing; the flaw's value is that it nullifies PKCE's protection once a code is in hand. It does not grant unauthenticated access against a default instance in isolation: a victim OAuth flow and code capture are prerequisites. Fixed entirely by upgrading to Gitea 1.25.5.

Impact

The signals here are notably split. CVSS 9.1 (AV:N/AC:L/PR:N/UI:N, C:H/I:H) and SSVC 'Technical Impact: total, Automatable: yes' paint a severe, network-exploitable picture, but SSVC 'Exploitation: none', EPSS of 0.17% (6th percentile), no CISA KEV listing, and no public exploit code all point to low real-world exploitation pressure today. There is also a meaningful nuance the raw vector understates: PKCE is a defense-in-depth control, so exploiting this weakness in practice requires an attacker to first intercept or obtain a victim's authorization code (e.g., via a malicious registered client, redirect/URI leakage, or a compromised public-client channel) - the flaw removes the safety net that would otherwise make a stolen code useless. Thus the AC:L rating is arguably optimistic; realistic exploitation depends on being positioned to capture an authorization code, which raises attack complexity. Net assessment: this is a genuine authentication-hardening defect worth patching promptly on any internet-facing Gitea acting as an OAuth2 provider, but it is not a spray-and-pray mass-exploitation bug - treat it as elevated priority rather than emergency, pending exposure of your OAuth2 provider usage.

Exploit ScenarioDerived

An attacker registers or abuses a public OAuth2 client on the Gitea instance and induces a victim to authorize it, then intercepts the issued authorization code (for example via a malicious mobile/desktop client, redirect interception, or a leaked callback). Because Gitea failed to persist the S256 challenge method, the attacker redeems that code at /login/oauth/access_token without supplying the correct code_verifier, obtaining an access token for the victim's account. No public proof-of-concept exists, but the vendor's regression test (TestAuthorizeGrantS256RequiresVerifier) precisely demonstrates the missing verifier enforcement.

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

OAuth2 PKCE protection bypass in Gitea before 1.25.5 allows remote attackers to complete an authorization-code token exchange without a valid code verifier because the server fails to persist the S256 challenge method during authorization. Rated CVSS 9.1 with SSVC technical impact of 'total', though EPSS is low (0.17%, 6th percentile) and there is no public exploit identified at time of analysis. The fix is confirmed in release v1.25.5 (PRs 36462 and 36477), which was reported by the Gitea project itself.

RemediationAI

Upgrade to Gitea 1.25.5 or later - this is the vendor-released patch (see the release at https://github.com/go-gitea/gitea/releases/tag/v1.25.5 and release notes at https://blog.gitea.com/release-of-1.25.5/; code fixes in https://github.com/go-gitea/gitea/pull/36462 and https://github.com/go-gitea/gitea/pull/36477). There is no configuration-level fix for the PKCE persistence bug itself, so patching is the primary and recommended remediation. As interim compensating controls if you cannot upgrade immediately: restrict which OAuth2 applications are registered on the instance and audit/remove untrusted registered clients (trade-off: administrative overhead and possible disruption to legitimate integrations), tightly constrain each OAuth application's allowed redirect URIs to exact, trusted values to limit authorization-code leakage (trade-off: breaks clients relying on loose redirect matching), and place the Gitea OAuth2 provider endpoints behind network restrictions or a reverse proxy limited to trusted networks where feasible (trade-off: may block legitimate external SSO consumers). Rotating client secrets after upgrade is also advisable if you suspect exposure.

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

Gitea is a self-hosted, lightweight open-source Git service written in Go that includes a built-in OAuth2/OpenID Connect provider (identified by CPE cpe:2.3:a:gitea:gitea_open_source_git_server). PKCE (Proof Key for Code Exchange, RFC 7636) hardens the OAuth2 authorization-code flow - especially for public clients - by binding the issued authorization code to a code_challenge, so the code cannot be redeemed without the matching code_verifier. The source evidence shows the root cause is a Go switch statement in routers/web/auth/oauth2_provider.go where 'case "S256":' and 'case "plain":' were written as separate empty cases; because Go cases do not fall through, the S256 challenge method was never properly recorded/persisted, so at token-exchange time the server did not enforce the verifier check. The fix collapses them into a single 'case "S256", "plain":'. The CWE-284 (Improper Access Control) classification reflects that a required authorization check (the PKCE verifier validation) was effectively skipped.

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-reachable and unauthenticated (PR:N/AV:N), but realistic exploitation requires intercepting a victim's authorization code, so AC:H; account takeover yields C:H/I:H, 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 persist the OAuth2 PKCE S256 challenge method correctly during authorization, allowing token exchange without the expected verifier check.

Executive ViewAI

Why It Matters

Gitea versions before 1.25.5 contain a critical OAuth2 authentication bypass (CVE-2026-26247, CVSS 9.1) that allows remote attackers to acquire authorization tokens without legitimate verification, potentially enabling unauthorized access to repositories and developer resources. Organizations running affected Gitea instances face elevated risk of account compromise and need immediate patching despite current low exploitation probability.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Prevalence
Medium
popular self-hosted Git server, common in dev environments but not ubiquitous
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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
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

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

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