{"id":"CVE-2026-128359","kind":"vulnerability","aliases":["CVE-2026-128359","GHSA-jrjr-q3rq-f899"],"related":[],"title":"OAuth2 provider keeps issuing tokens to disabled users","description":"**Summary**\nWhen 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.\n\n**Details**\n- `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.\n- Introspection returns an HTML block page for inactive and prohibited users.\n\n**Impact**\nDisabling an account in Gitea does not end that person's access to the applications that use Gitea for sign-in.\n\n**Suggested fix**\nCheck `IsActive` and `ProhibitLogin` in the refresh, code exchange and introspection paths. Revoke grants when a user is disabled.","summary":"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.","severity":"medium","cvss":5.4,"epss":null,"exploited":false,"exploited_at":null,"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"],"how_to_check":"- Check the Gitea version with `gitea --version` and compare it with the affected range.\n- Confirm whether Gitea is set up as an OAuth2 provider for other applications (OAuth2 provider settings in the admin panel).\n- Disable a test user and confirm whether a refresh token from that user still works.","fix":"- Gitea: move to `28.4.0` or later.","status":"open","published_at":"2026-11-15T21:03:19+00:00","first_seen_at":"2026-11-15T21:12:46+00:00","triaged_at":"2026-11-15T21:14:09+00:00","updated_at":"2026-11-15T21:14:09+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-11-15T21:14:09Z","model":"claude-haiku-5-5","output":{"fix":"- Gitea: move to `28.4.0` or later.","reach":"network","title":"Gitea: disabled users keep receiving OAuth2 tokens from the provider","impact":"medium","summary":"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.","audience":"businesses","category":"package","nicknames":[],"who_cares":["gitea","self-hosted","oauth2","oidc"],"confidence":0.8,"fix_status":"available","needs_auth":"yes","worst_case":"Deactivated users keep access to applications that rely on Gitea sign-in.","analyst_note":"","how_to_check":"- Check the Gitea version with `gitea --version` and compare it with the affected range.\n- Confirm whether Gitea is set up as an OAuth2 provider for other applications (OAuth2 provider settings in the admin panel).\n- Disable a test user and confirm whether a refresh token from that user still works.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["gitea-not-oauth-provider","default-config"],"who_is_affected":"Teams that run Gitea as an OAuth2 or OIDC identity provider for other applications are exposed, because disabling a user in Gitea does not revoke their tokens. Gitea used only as a plain git host, or with sign-in delegated to another provider, is not affected by this token path.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.000774,"input_tokens":4811,"output_tokens":585,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-128359':11A,19A '-2026':10A,18A '-613':22B '-633':124C '-722':128C '568':123C '635':127C 'access':169C 'account':160C 'act':32B 'activ':50B 'admin':94C 'applic':72B,172C 'author':68B,112C 'block':150C 'check':44B,88C,134C,182C 'code':69B,113C,129C,189C 'cve':9A,17A 'cwe':21B 'deactiv':56B,95C 'detail':121C 'disabl':7A,145C,158C,200C 'end':165C 'endpoint':41B,85C 'exchang':66B,110C,130C,190C 'f899':16A 'fix':181C 'forev':108C 'ghsa':13A 'ghsa-jrjr-q3rq-f899':12A 'gitea':23B,31B,78C,162C,175C 'gitea.dev':20A 'grant':137C,195C 'host':29B 'html':149C 'impact':157C 'inact':153C 'introspect':146C,192C 'isact':183C 'issu':4A 'jrjr':14A 'keep':3A,62B,73B,116C 'load':132C 'login':60B,101C 'never':131C 'oauth2':1A,24B,35B 'oauth2/oidc':81C 'oidc':25B,37B 'old':67B,111C 'packag':26B 'page':151C 'parti':115C 'path':193C 'person':167C 'prohibit':58B,100C,155C 'prohibitlogin':185C 'provid':2A,38B,82C 'q3rq':15A 'refresh':63B,106C,125C,188C 'reli':71B,114C 'return':147C 'revok':140C,194C 'routers/web/auth/oauth2_provider.go':122C 'self':28B 'self-host':27B 'set':99C 'sign':75B,119C,178C 'sign-in':177C 'state':91C 'still':49B,105C 'suggest':180C 'summari':76C 'token':5A,40B,64B,84C,107C 'use':174C 'user':8A,47B,52B,90C,97C,103C,118C,136C,143C,156C,198C 'whether':45B","nicknames":[],"mitigations":[],"who_affected":"Teams that run Gitea as an OAuth2 or OIDC identity provider for other applications are exposed, because disabling a user in Gitea does not revoke their tokens. Gitea used only as a plain git host, or with sign-in delegated to another provider, is not affected by this token path.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":["giteadev"],"ptokens":["dev","gitea"],"labels":["cwe613","gitea","go","medium","oauth2","oidc","package","selfhosted"],"campaign_type":null,"search_a":"'-128359':11A,19A '-2026':10A,18A 'cve':9A,17A 'disabl':7A 'f899':16A 'ghsa':13A 'ghsa-jrjr-q3rq-f899':12A 'gitea.dev':20A 'issu':4A 'jrjr':14A 'keep':3A 'oauth2':1A 'provid':2A 'q3rq':15A 'token':5A 'user':8A","search_b":"'-613':22B 'act':32B 'activ':50B 'applic':72B 'author':68B 'check':44B 'code':69B 'cwe':21B 'deactiv':56B 'endpoint':41B 'exchang':66B 'gitea':23B,31B 'host':29B 'keep':62B,73B 'login':60B 'oauth2':24B,35B 'oidc':25B,37B 'old':67B 'packag':26B 'prohibit':58B 'provid':38B 'refresh':63B 'reli':71B 'self':28B 'self-host':27B 'sign':75B 'still':49B 'token':40B,64B 'user':47B,52B 'whether':45B","search_c":"'-633':124C '-722':128C '568':123C '635':127C 'access':169C 'account':160C 'admin':94C 'applic':172C 'author':112C 'block':150C 'check':88C,134C,182C 'code':113C,129C,189C 'deactiv':95C 'detail':121C 'disabl':145C,158C,200C 'end':165C 'endpoint':85C 'exchang':110C,130C,190C 'fix':181C 'forev':108C 'gitea':78C,162C,175C 'grant':137C,195C 'html':149C 'impact':157C 'inact':153C 'introspect':146C,192C 'isact':183C 'keep':116C 'load':132C 'login':101C 'never':131C 'oauth2/oidc':81C 'old':111C 'page':151C 'parti':115C 'path':193C 'person':167C 'prohibit':100C,155C 'prohibitlogin':185C 'provid':82C 'refresh':106C,125C,188C 'reli':114C 'return':147C 'revok':140C,194C 'routers/web/auth/oauth2_provider.go':122C 'set':99C 'sign':119C,178C 'sign-in':177C 'state':91C 'still':105C 'suggest':180C 'summari':76C 'token':84C,107C 'use':174C 'user':90C,97C,103C,118C,136C,143C,156C,198C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-11-15T21:03:19+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"ghsa-repo","external_id":"GHSA-jrjr-q3rq-f899","url":"https://github.com/go-gitea/gitea/security/advisories/GHSA-jrjr-q3rq-f899","severity":"medium","published_at":"2026-11-15T21:03:19+00:00","modified_at":"2026-11-15T21:03:19+00:00","first_seen_at":"2026-11-15T21:12:46+00:00","fetched_at":"2026-11-15T21:12:46+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-128359","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-128359","severity":null,"published_at":"2026-11-15T22:17:19+00:00","modified_at":"2026-11-15T22:17:19+00:00","first_seen_at":"2026-11-15T22:40:23+00:00","fetched_at":"2026-11-15T22:40:24+00:00","note":null}],"documents":[{"id":165562,"url":"https://github.com/go-gitea/gitea/security/advisories/GHSA-jrjr-q3rq-f899","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa-repo","publisher":"vendor","text":null,"published_at":"2026-11-15T21:03:19+00:00","relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"},{"id":165694,"url":"https://github.com/go-gitea/gitea/releases/tag/v28.4.0","title":"Release notes: github.com","kind":"release","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release notes: github.com"}],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}