CVE-2026-26232

Gitea OAuth2 authorization codes lack expiry and reuse enforcement

Published Jul 3, 2026 CVSS 3.1 · 9.1 Critical EPSS < 1% KEV · Not listed
Description
Gitea versions before 1.25.5 do not consistently enforce OAuth2 authorization code expiry and single-use behavior during token exchange.

Analysis

AI-generated

Technical impact

Gitea versions before 1.25.5 allow OAuth2 authorization codes to be used more than once and do not enforce an expiration time (this is a flaw mapped to CWE‑294). As a result, a valid authorization code can be exchanged for an access token repeatedly, and the code can be used at any time after issuance unless it is manually revoked. The consequence is that an attacker who obtains a legitimate code—through phishing, interception, or a compromised client—could use it to obtain an access token that grants unauthorized access to the victim’s resources.

Affected Systems

All deployments of Gitea Open Source Git Server running a version earlier than 1.25.5 are affected. The advisory does not specify conditional limitations on operating system, network topology, or hosting environment, implying that every instance of the vulnerable application is potentially exploitable regardless of underlying infrastructure.

Risk and Exploitability

The CVSS score of 9.1 indicates critical severity. The EPSS score of <1% indicates that wild exploitation is unlikely, yet the flaw remains significant for targeted attacks. The vulnerability is not currently listed in CISA’s KEV catalog. Based on the description, it is inferred that an attacker could exploit the lack of single-use enforcement during the OAuth2 token exchange step to obtain a long‑lived access token. Such a token could then be used to access resources under the victim’s account. The exact likelihood of exploitation depends on the attacker’s ability to acquire a valid authorization code, which is not detailed in the CVE data.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Gitea to version 1.25.5, which enforces authorization code expiry and single‑use behavior
  • Restrict OAuth2 client registration to trusted applications and limit requested scopes to the minimum required
  • If an upgrade is not immediately possible, disable external OAuth2 authentication until the fix is applied or monitor authentication logs for abnormal code reuse patterns

Generated by OpenCVE AI on August 1, 2026 at 20:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-5v69-g2m3-3hq3 Gitea OAuth2 authorization codes can be reused after expiry
History
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea Open Source Git Server
Vendors & Products Gitea
Gitea gitea Open Source Git Server
Type Values Removed Values Added
Description Gitea versions before 1.25.5 do not consistently enforce OAuth2 authorization code expiry and single-use behavior during token exchange.
Title Gitea OAuth2 authorization codes lack expiry and reuse enforcement
Weaknesses CWE-294
References
Weaknesses
  • CWE-294

    Authentication Bypass by Capture-replay

Sources

Status
PUBLISHED
Assigner
Gitea
Published
Updated
Jul 7, 2026, 4:59 PM
Reserved
Mar 3, 2026, 3:25 AM
Status
Deferred
Published
Jul 3, 2026, 9:16 PM
Modified
Oct 25, 2026, 3:10 PM