CVE-2026-101023

Gitea OAuth2 refresh token grant accepts access tokens

Published Oct 6, 2026 CVSS 3.1 · 9.1 Critical EPSS < 1% KEV · Not listed
Description
Gitea's OAuth2 token endpoint verified the signature and grant of a token submitted with the `refresh_token` grant type, but not that the token was a refresh token. An unexpired access token for the same OAuth2 application and grant could be exchanged for a new access token and refresh token. Whoever holds such an access token could keep access beyond the token's original lifetime.

Analysis

AI-generated

Technical impact

The vulnerability is an OAuth2 token endpoint flaw that accepts any unexpired access token as a refresh token because the endpoint does not verify the token type. This permits an attacker who already holds a valid access token to repeatedly exchange it for fresh access and refresh tokens, thereby extending the authenticated session far beyond the original expiry. The weakness is a combination of token type validation failure and improper token handling (CWE-1287, CWE-287).

Affected Systems

The flaw is present in Gitea's OAuth2 implementation. The CVE references a fix in the 28.1.0 release, but the CVE data does not specify an affected-version range; consequently, the exact scope of vulnerable releases is uncertain. Administrators should assume that all Gitea deployments that have not applied the latest security patch may be susceptible until the fix is applied.

Risk and Exploitability

A valid token for a given OAuth2 application is enough to carry out the attack. The attacker issues a standard token-refresh request, the server accepts it, and supplies new tokens. The CVSS score of 9.1 indicates critical severity. The EPSS score of less than 1% suggests that widespread exploitation is unlikely at present, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector is a legitimate web request to the "/oauth/token" endpoint, and the exploit requires no special privileges beyond a stolen or legitimate access token.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update Gitea to the latest release that contains the fix for the OAuth2 token endpoint validation.
  • If an update is not possible immediately, temporarily disable OAuth2 refresh token usage or enforce token type checks for critical applications.
  • Continuously monitor authentication logs for abnormal or repeated token refresh attempts to detect possible abuse.

Generated by OpenCVE AI on October 17, 2026 at 11:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-640
Type Values Removed Values Added
CPEs cpe:2.3:a:gitea:gitea:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Weaknesses CWE-287
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
Vendors & Products Gitea
Gitea gitea
Type Values Removed Values Added
Weaknesses CWE-640
Type Values Removed Values Added
Description Gitea's OAuth2 token endpoint verified the signature and grant of a token submitted with the `refresh_token` grant type, but not that the token was a refresh token. An unexpired access token for the same OAuth2 application and grant could be exchanged for a new access token and refresh token. Whoever holds such an access token could keep access beyond the token's original lifetime.
Title Gitea OAuth2 refresh token grant accepts access tokens
References
Weaknesses
  • CWE-1287

    Improper Validation of Specified Type of Input

  • CWE-287

    Improper Authentication

Sources

Status
PUBLISHED
Assigner
Gitea
Published
Updated
Oct 7, 2026, 8:04 PM
Reserved
Oct 4, 2026, 10:02 PM
Status
Analyzed
Published
Oct 6, 2026, 10:16 PM
Modified
Oct 13, 2026, 2:39 PM
Severity
Moderate
Public date
Oct 6, 2026, 9:34 PM