Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessRegister or abuse OAuth2 public client
-
DeliveryInduce victim to authorize app
-
ExploitIntercept issued authorization code
-
ExecutionRedeem code without PKCE verifier
-
ImpactObtain 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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, 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
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
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.
Primary rating from Vendor (Gitea).
CVSS VectorVendor: Gitea
Lifecycle Timeline
2DescriptionCVE.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
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.
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
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
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
EUVD-2026-41629
GHSA-m5ch-ppfx-xv3v
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB