<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Gitea (All Versions Prior to 1.26.4) - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/gitea-all-versions-prior-to-1.26.4/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Tue, 21 Jul 2026 21:52:53 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/gitea-all-versions-prior-to-1.26.4/feed.xml" rel="self" type="application/rss+xml"/><item><title>Gitea OAuth Callback Re-enables Administrator-Disabled Accounts</title><link>https://feed.craftedsignal.io/briefs/2026-07-gitea-oauth-reenable/</link><pubDate>Tue, 21 Jul 2026 21:52:53 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-gitea-oauth-reenable/</guid><description>An improper authorization vulnerability in Gitea's OAuth2 sign-in callback mechanism (CVE-2026-58422) allows users with linked external identity providers to unilaterally re-enable their administrator-disabled accounts, regaining full access and bypassing security controls.</description><content:encoded><![CDATA[<p>A high-severity improper authorization vulnerability, identified as CVE-2026-58422, affects Gitea versions prior to 1.26.4. This flaw allows users whose accounts have been disabled by an administrator to bypass this restriction and regain full access to their Gitea repositories, organizations, and access tokens. The vulnerability resides within the OAuth2 sign-in callback functionality, specifically in the <code>handleOAuth2SignIn</code> function. When a user with a previously linked external identity provider attempts to authenticate through OAuth2, the Gitea application logic incorrectly re-enables their locally disabled account and grants them a fresh authenticated session. This effectively nullifies administrator-initiated account disablement, posing a significant risk to incident response efforts, especially in environments relying on account deactivation for compromised or departed user scenarios.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An administrator configures an OAuth2 authentication source within Gitea, linking it to an external Identity Provider (IdP).</li>
<li>A user, e.g., &quot;Alice,&quot; signs into Gitea at least once via this OAuth2 source, establishing a link between her local Gitea account and the external IdP.</li>
<li>A Gitea administrator subsequently disables Alice's account through the <code>Site Administration</code> panel, setting her <code>IsActive</code> flag to <code>false</code>.</li>
<li>Alice attempts to sign in again using the previously linked external IdP, triggering the OAuth2 authentication flow.</li>
<li>The Gitea application's <code>/user/oauth2/{source-name}/callback</code> endpoint processes the authentication request.</li>
<li>Within the <code>routers/web/auth/oauth.go::handleOAuth2SignIn</code> function, the application reads the user's <code>IsActive</code> flag and, despite it being <code>false</code>, incorrectly sets <code>opts.IsActive = optional.Some(true)</code>.</li>
<li>The <code>user_service.UpdateUser</code> function is called, which updates Alice's account in the database, effectively re-enabling it without administrative approval.</li>
<li>Gitea issues a new authenticated session to Alice, granting her full read and write access to her repositories, organizations, and tokens, bypassing the administrator's disable action.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>This vulnerability allows users to circumvent administrative account disablement, leading to unauthorized access and persistence. In organizations utilizing Gitea, particularly those integrated with Single Sign-On (SSO) systems where account disablement is a critical incident response measure for compromised credentials or employee departures, this flaw completely undermines security protocols. Affected Gitea deployments risk former employees or attackers with compromised external IdP access continuously regaining access, leading to data exfiltration, unauthorized code commits, or other malicious activities, even after an administrator has attempted to revoke access.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Patch Gitea installations to version 1.26.4 or later immediately to address CVE-2026-58422.</li>
<li>Review audit logs for <code>UpdateUser</code> actions originating from OAuth callback processes for users previously disabled by an administrator.</li>
<li>Consider implementing out-of-band monitoring for unexpected account re-activations, especially for accounts marked as disabled.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>improper-authorization</category><category>oauth</category><category>account-takeover</category><category>persistence</category><category>vulnerability</category></item></channel></rss>