Gitea: OAuth2 sign-in reactivates an administrator-deactivated account on auth sources without refresh tokens (incomplete fix of #38009) (CVE-2026-55987)
Gitea versions prior to 1.27.0 contain a vulnerability where OAuth2 sign-in reactivates user accounts that administrators have deactivated if the authentication source does not issue refresh tokens (e.g., GitHub or OIDC/OAuth2 without offline_access). This occurs because the system incorrectly uses an empty refresh token as a signal to reactivate accounts, which is the normal state for such sources. As a result, deactivated users can regain active status and full session access simply by signing in again, bypassing the administrator's deactivation. Accounts disabled with the stronger "Prohibit Login" setting are not affected.
AI Analysis
Technical Summary
Gitea's OAuth2 sign-in callback incorrectly reactivates user accounts marked as inactive when the authentication source does not provide refresh tokens. The reactivation gate relies on detecting an empty refresh token to identify accounts disabled by the auto-sync cron, but for sources like GitHub that never issue refresh tokens, this condition is always true. Consequently, when a deactivated user signs in via such a source, Gitea sets their IsActive flag to true and grants a session, undoing the administrator's deactivation. This vulnerability affects Gitea versions before 1.27.0 and impacts any instance using GitHub or OAuth2/OIDC sources without offline_access that rely on the "Activated" toggle for account disabling. The vulnerability does not affect accounts disabled with the "Prohibit Login" hard ban. No special privileges are required beyond the ability to sign in as the deactivated user.
Potential Impact
Deactivated user accounts can regain active status and full session access by signing in through an OAuth2 source that does not issue refresh tokens, such as GitHub. This bypasses the administrator's deactivation action, potentially restoring all prior access rights, including administrative privileges if the account was an administrator. The vulnerability does not affect accounts disabled using the "Prohibit Login" setting, which remains enforced. This undermines the effectiveness of the "Activated" toggle as a means to disable user accounts in affected configurations.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, administrators should avoid relying solely on the "Activated" toggle to disable accounts for users authenticating via OAuth2 sources without refresh tokens. Instead, use the "Prohibit Login" setting to enforce account disablement, as it is not affected by this vulnerability. Monitor official Gitea advisories for updates and apply patches once released.
Gitea: OAuth2 sign-in reactivates an administrator-deactivated account on auth sources without refresh tokens (incomplete fix of #38009) (CVE-2026-55987)
Description
Gitea versions prior to 1.27.0 contain a vulnerability where OAuth2 sign-in reactivates user accounts that administrators have deactivated if the authentication source does not issue refresh tokens (e.g., GitHub or OIDC/OAuth2 without offline_access). This occurs because the system incorrectly uses an empty refresh token as a signal to reactivate accounts, which is the normal state for such sources. As a result, deactivated users can regain active status and full session access simply by signing in again, bypassing the administrator's deactivation. Accounts disabled with the stronger "Prohibit Login" setting are not affected.
CVSS v3.1
Score 8.1high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Gitea's OAuth2 sign-in callback incorrectly reactivates user accounts marked as inactive when the authentication source does not provide refresh tokens. The reactivation gate relies on detecting an empty refresh token to identify accounts disabled by the auto-sync cron, but for sources like GitHub that never issue refresh tokens, this condition is always true. Consequently, when a deactivated user signs in via such a source, Gitea sets their IsActive flag to true and grants a session, undoing the administrator's deactivation. This vulnerability affects Gitea versions before 1.27.0 and impacts any instance using GitHub or OAuth2/OIDC sources without offline_access that rely on the "Activated" toggle for account disabling. The vulnerability does not affect accounts disabled with the "Prohibit Login" hard ban. No special privileges are required beyond the ability to sign in as the deactivated user.
Potential Impact
Deactivated user accounts can regain active status and full session access by signing in through an OAuth2 source that does not issue refresh tokens, such as GitHub. This bypasses the administrator's deactivation action, potentially restoring all prior access rights, including administrative privileges if the account was an administrator. The vulnerability does not affect accounts disabled using the "Prohibit Login" setting, which remains enforced. This undermines the effectiveness of the "Activated" toggle as a means to disable user accounts in affected configurations.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, administrators should avoid relying solely on the "Activated" toggle to disable accounts for users authenticating via OAuth2 sources without refresh tokens. Instead, use the "Prohibit Login" setting to enforce account disablement, as it is not affected by this vulnerability. Monitor official Gitea advisories for updates and apply patches once released.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-vrhc-jjfc-m3m3
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-55987"]
- Ecosystems
- ["Go"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a600ab19c2644c7f8fe1c78
Added to database: 07/22/2026, 00:11:29 UTC
Last enriched: 07/22/2026, 00:46:00 UTC
Last updated: 07/31/2026, 12:28:12 UTC
Views: 5
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.