---
id: "CVE-2026-128359"
page: "https://infrastack.ai/live/CVE-2026-128359"
kind: "vulnerability"
aliases: ["CVE-2026-128359", "GHSA-jrjr-q3rq-f899"]
title: "OAuth2 provider keeps issuing tokens to disabled users"
severity: "medium"
cvss: 5.4
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "gitea.dev", "fixed": ["28.4.0"], "affected": "<= 28.3.0", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["cwe-613", "gitea", "oauth2", "oidc", "package", "self-hosted"]
not_affected_if: ["default-config", "gitea-not-oauth-provider"]
published_at: "2026-11-15T21:03:19+00:00"
first_seen_at: "2026-11-15T21:12:46+00:00"
updated_at: "2026-11-15T21:14:09+00:00"
sources: [{"source": "ghsa-repo", "url": "https://github.com/go-gitea/gitea/security/advisories/GHSA-jrjr-q3rq-f899", "first_seen_at": "2026-11-15T21:12:46+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-128359", "first_seen_at": "2026-11-15T22:40:23+00:00"}]
exploit_sources: []
---

# OAuth2 provider keeps issuing tokens to disabled users

Link for people: https://infrastack.ai/live/CVE-2026-128359 (this .md is for agents)

When Gitea acts as an OAuth2 or OIDC provider, its token endpoint does not check whether the user is still active. A user who has been deactivated or prohibited from login can keep refreshing tokens and exchange old authorization codes, so relying applications keep them signed in.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- go:gitea.dev affected <= 28.3.0 fixed 28.4.0

## How to check

- Check the Gitea version with `gitea --version` and compare it with the affected range.
- Confirm whether Gitea is set up as an OAuth2 provider for other applications (OAuth2 provider settings in the admin panel).
- Disable a test user and confirm whether a refresh token from that user still works.

## Fix

- Gitea: move to `28.4.0` or later.

## Timeline

- 2026-11-15T21:12:46+00:00 ghsa-repo https://github.com/go-gitea/gitea/security/advisories/GHSA-jrjr-q3rq-f899
- 2026-11-15T22:40:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-128359

## Documents

- [advisory] Maintainer's advisory: github.com https://github.com/go-gitea/gitea/security/advisories/GHSA-jrjr-q3rq-f899
- [fix] Release notes: github.com https://github.com/go-gitea/gitea/releases/tag/v28.4.0

## From the sources

**Summary**
When Gitea is an OAuth2/OIDC provider, the token endpoint does not check the user state. After an admin deactivates a user or sets "prohibit login", the user can still refresh tokens forever and exchange old authorization codes. Relying parties keep the user signed in.

**Details**
- `routers/web/auth/oauth2_provider.go:568-633` (refresh) and `:635-722` (code exchange) never load or check the user. Grants are not revoked when a user is disabled.
- Introspection returns an HTML block page for inactive and prohibited users.

**Impact**
Disabling an account in Gitea does not end that person's access to the applications that use Gitea for sign-in.

**Suggested fix**
Check `IsActive` and `ProhibitLogin` in the refresh, code exchange and introspection paths. Revoke grants when a user is disabled.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
