Gitea: Improper authorization on OAuth sign-in callback silently re-enables administrator-disabled accounts (CVE-2026-58422)
Gitea version prior to 1.26.4 contains an improper authorization vulnerability in the OAuth2 sign-in callback. When a user authenticates via a linked external identity provider, the system silently re-enables accounts that were disabled by an administrator, bypassing the intended administrative disable action. This allows the user to regain full access, including read/write permissions to repositories and organizations, by simply completing the OAuth callback. This flaw undermines the disable account feature used for incident response in SSO deployments.
AI Analysis
Technical Summary
The OAuth2 sign-in callback endpoint in Gitea 1.26.1 improperly handles the local user's active status. Specifically, if the local account is disabled (IsActive=false), the callback forcibly sets the account to active (IsActive=true) before updating the user record and issuing a session. This behavior effectively negates any administrator-initiated disable action once the user authenticates through a linked external identity provider. The root cause is that the callback treats the local active flag as non-authoritative bookkeeping rather than an administrative override, unlike the local credential sign-in path which correctly enforces the inactive state.
Potential Impact
An attacker with a linked external identity provider can bypass the administrator's disable account action by completing the OAuth sign-in callback, thereby re-enabling their account without administrator intervention. This grants the user full access to their repositories, organizations, and access tokens, defeating the primary short-term remediation method for compromised or deprovisioned accounts in Gitea deployments using SSO.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, administrators should be aware that disabling accounts is ineffective for users with linked external identity providers. Alternative incident response measures should be considered, such as revoking access at the identity provider level or restricting OAuth authentication sources. Monitor vendor communications for updates and apply patches promptly once released.
Gitea: Improper authorization on OAuth sign-in callback silently re-enables administrator-disabled accounts (CVE-2026-58422)
Description
Gitea version prior to 1.26.4 contains an improper authorization vulnerability in the OAuth2 sign-in callback. When a user authenticates via a linked external identity provider, the system silently re-enables accounts that were disabled by an administrator, bypassing the intended administrative disable action. This allows the user to regain full access, including read/write permissions to repositories and organizations, by simply completing the OAuth callback. This flaw undermines the disable account feature used for incident response in SSO deployments.
CVSS v4.0
Affected software
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The OAuth2 sign-in callback endpoint in Gitea 1.26.1 improperly handles the local user's active status. Specifically, if the local account is disabled (IsActive=false), the callback forcibly sets the account to active (IsActive=true) before updating the user record and issuing a session. This behavior effectively negates any administrator-initiated disable action once the user authenticates through a linked external identity provider. The root cause is that the callback treats the local active flag as non-authoritative bookkeeping rather than an administrative override, unlike the local credential sign-in path which correctly enforces the inactive state.
Potential Impact
An attacker with a linked external identity provider can bypass the administrator's disable account action by completing the OAuth sign-in callback, thereby re-enabling their account without administrator intervention. This grants the user full access to their repositories, organizations, and access tokens, defeating the primary short-term remediation method for compromised or deprovisioned accounts in Gitea deployments using SSO.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, administrators should be aware that disabling accounts is ineffective for users with linked external identity providers. Alternative incident response measures should be considered, such as revoking access at the identity provider level or restricting OAuth authentication sources. Monitor vendor communications for updates and apply patches promptly once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- Gitea
- Date Reserved
- 2026-06-30T18:57:20.614Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
- Gcve Source
- db.gcve.eu
Threat ID: 6a483c9d27e9c79719d7f5da
Added to database: 07/03/2026, 22:50:05 UTC
Last enriched: 07/22/2026, 01:08:24 UTC
Last updated: 07/22/2026, 01:08:24 UTC
Views: 61
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.