<?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>@Better-Auth/Sso (&gt;= 1.2.10, &lt; 1.6.11) - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/@better-auth/sso--1.2.10--1.6.11/</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>Mon, 20 Jul 2026 21:10:10 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/@better-auth/sso--1.2.10--1.6.11/feed.xml" rel="self" type="application/rss+xml"/><item><title>@better-auth/sso Authorization Bypass Allows Unauthorized SSO Provider Registration</title><link>https://feed.craftedsignal.io/briefs/2026-07-better-auth-sso-auth-bypass/</link><pubDate>Mon, 20 Jul 2026 21:10:10 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-better-auth-sso-auth-bypass/</guid><description>A high-severity authorization bypass vulnerability (CVE-2026-53515) in `@better-auth/sso` versions `&gt;= 1.2.10, &lt; 1.6.11` allows regular organization members to register new SSO providers for an organization, potentially leading to unauthorized user creation and, under specific configurations, unauthorized administrative access within the target organization.</description><content:encoded><![CDATA[<p>A critical authorization bypass vulnerability, tracked as CVE-2026-53515, has been identified in the <code>@better-auth/sso</code> package, affecting versions <code>&gt;= 1.2.10</code> and <code>&lt; 1.6.11</code>. This flaw allows any member of an organization to register a new Single Sign-On (SSO) provider via the <code>POST /sso/register</code> endpoint, even if they lack administrative privileges. The vulnerability arises because the endpoint checks for a valid membership but fails to verify the user's administrative role, a check that is enforced for other SSO provider management actions like listing, getting, updating, or deleting. This authorization mismatch enables unauthorized configuration of SSO providers and can lead to the creation of unapproved user accounts, and potentially administrative accounts, within the affected organization, especially if <code>organizationProvisioning.defaultRole</code> is set to 'admin' or <code>domainVerification.enabled</code> is false. Organizations leveraging <code>sso()</code> and <code>organization()</code> plugins with a non-zero <code>providersLimit</code> are particularly at risk.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker obtains or utilizes an existing regular member account within a target organization that uses <code>@better-auth/sso</code>.</li>
<li>The attacker crafts and sends an HTTP POST request to the <code>/sso/register</code> endpoint, including details for a new, attacker-controlled OIDC or SAML identity provider, specifying the target <code>organizationId</code>.</li>
<li>Due to the authorization bypass (CVE-2026-53515), the <code>@better-auth/sso</code> application successfully processes the registration without verifying the caller's administrative role.</li>
<li>A new, attacker-controlled SSO provider is created and illicitly associated with the target organization.</li>
<li>The attacker then directs users (or themselves) to authenticate via this newly registered SSO provider, which processes identities through the <code>/sso/callback/{providerId}</code> endpoint.</li>
<li>The application's <code>organizationProvisioning</code> mechanism adds these IdP-asserted users into the target organization.</li>
<li>If the <code>organizationProvisioning.defaultRole</code> or <code>organizationProvisioning.getRole</code> is configured to return <code>admin</code> for provisioned users, the attacker can create new administrative accounts.</li>
<li>The final objective is unauthorized control over SSO configurations, unauthorized user creation, or potentially unauthorized administrative access within the target organization.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>This vulnerability can lead to several severe consequences for affected organizations. The primary impact is the unauthorized configuration of SSO providers, allowing a low-privileged member to link an attacker-controlled identity provider to the organization. This can further lead to unauthorized organization membership creation, where IdP-asserted users are added to the target organization without proper oversight. In the worst-case scenario, if <code>organizationProvisioning.defaultRole</code> is set to <code>admin</code> or <code>organizationProvisioning.getRole</code> returns <code>admin</code>, the issue can result in the creation of administrative-level accounts within the organization without owner consent, effectively granting an attacker broad control. The immediate usability of a malicious provider is heightened if <code>domainVerification.enabled</code> is <code>false</code>.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li><strong>Patch CVE-2026-53515 immediately</strong> by upgrading to <code>@better-auth/sso@1.6.11</code> or later to ensure the <code>registerSSOProvider</code> handler enforces the correct administrative role check.</li>
<li><strong>Disable user-driven SSO registration</strong> by setting <code>sso({ providersLimit: 0 })</code> if immediate upgrade is not possible. This will prevent all self-serve provider creation, requiring server-side calls for legitimate registrations.</li>
<li><strong>Disable SSO-driven organization provisioning</strong> by setting <code>sso({ organizationProvisioning: { disabled: true } })</code> if direct upgrade is unfeasible, which will prevent the malicious provider from automatically adding users.</li>
<li><strong>Implement a custom <code>before</code> hook</strong> on <code>/sso/register</code> that explicitly asserts the caller's role on <code>body.organizationId</code> is <code>owner</code> or <code>admin</code> as a temporary workaround until patching is complete.</li>
<li><strong>Audit existing <code>ssoProvider</code> rows</strong> where <code>organizationId IS NOT NULL</code> and cross-reference the <code>userId</code> with <code>member.role</code> to identify and remove provider records created by non-admin users.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>web</category><category>vulnerability</category><category>authorization-bypass</category><category>sso</category></item></channel></rss>