@better-auth/sso@1.6.9

SSO plugin for Better Auth

  • latest version

    1.7.1

  • latest non vulnerable version

  • first published

    1 years ago

  • latest version published

    3 hours ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the @better-auth/sso package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    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
    • H
    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.

    <1.6.11
    • H
    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.

    <1.6.11