Cross-site Scripting (XSS)@better-auth/sso is a SSO plugin for Better Auth
Affected versions of this package are vulnerable to Cross-site Scripting (XSS) through the SAML login pipeline in packages/sso/src/routes/saml-pipeline.ts. An attacker can sign in as another user by sending a SAML response whose AudienceRestriction, bearer Recipient, or Destination is meant for a different service provider but is still accepted during session creation. This lets the attacker obtain a valid session for the victim account; in affected deployments, that can also grant the victim’s organization privileges if the account is an owner or admin.
Workarounds
- Leave
saml.enableSingleLogout off unless you need single logout.
- Prefer pre-validated
defaultSSO providers for SAML.
How to fix Cross-site Scripting (XSS)? Upgrade @better-auth/sso to version 1.6.21, 1.7.0-beta.10 or higher.
| <1.6.21>=1.7.0-beta.0 <1.7.0-beta.10 |
Incorrect Authorization@better-auth/sso is a SSO plugin for Better Auth
Affected versions of this package are vulnerable to Incorrect Authorization via the POST /sso/register endpoint, which allows any organization member to attach a new SSO provider without verifying admin or owner privileges. An attacker can gain elevated access by registering a malicious OIDC or SAML provider and triggering organization provisioning through crafted requests.
How to fix Incorrect Authorization? Upgrade @better-auth/sso to version 1.6.11 or higher.
| |
Server-side Request Forgery (SSRF)@better-auth/sso is a SSO plugin for Better Auth
Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the POST /sso/register and POST /sso/update-provider endpoints when attacker-controlled OIDC endpoint URLs are accepted without proper validation if skipDiscovery: true is set. An attacker can access internal resources or sensitive data by supplying malicious endpoints, leading the server to make requests to arbitrary URLs. If trustEmailVerified: true is enabled and the deployment has accounts with emails overlapping attacker-chosen domains, the attacker can escalate to account takeover by crafting a malicious userInfo response.
Note: This is only exploitable if the SSO plugin is enabled, the attacker has a valid session, and the application allows registration or update of providers with unvalidated endpoints.
How to fix Server-side Request Forgery (SSRF)? Upgrade @better-auth/sso to version 1.6.11 or higher.
| |