@better-auth/sso is vulnerable to Improper Authorization
71
High Risk
The SSO plugin's POST /sso/register endpoint lets any authenticated organization member attach a new SSO provider to that organization. The handler verifies only that the caller has a membership row and never checks whether they hold an owner or admin role, unlike the companion list, get, update, and delete endpoints that gate on isOrgAdmin. A low-privilege member can register an attacker-controlled OIDC or SAML identity provider on an organization they do not administer, and subsequent SSO callbacks can provision IdP-asserted users into that organization. The fix introduces a shared admin-role check so provider registration matches the protection on the other org-linked provider endpoints.
You are affected if you are using a version that falls within the vulnerable range and you enable both the sso and organization plugins with user-driven SSO provider registration enabled.
@better-auth/sso is vulnerable to Improper Authorization in versions 1.2.10 - 1.6.10.
Upgrade the @better-auth/sso library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant