Description
Better Auth is an authentication and authorization library for TypeScript. Prior to 1.6.11, the @better-auth/sso plugin's POST /sso/register and POST /sso/update-provider endpoints accept attacker-controlled oidcConfig.userInfoEndpoint, tokenEndpoint, and jwksEndpoint URLs when skipDiscovery: true is set, store them on the ssoProvider row without origin validation, and fetch them during OIDC callback, allowing non-blind server-side request forgery and possible account linking when trustEmailVerified: true is configured. This issue is fixed in version 1.6.11.
Published: 2026-07-15
Score: 9.6 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A misconfiguration in the @better-auth/sso plugin permits an attacker to provide arbitrary OIDC endpoints via the oidcConfig.userInfoEndpoint, tokenEndpoint, and jwksEndpoint fields when skipDiscovery is set to true. These values are stored on the ssoProvider row without origin validation and fetched during the OIDC callback, enabling non‑blind server‑side request forgery and allowing the application to make arbitrary internal or external network requests. If trustEmailVerified is enabled, the attacker can also link victim accounts and gain unauthorized access to existing user accounts. The weakness corresponds to CWE‑20 (Improper Input Validation), CWE‑345 (Exploitable Sensitive Information), CWE‑441 (Insufficient Access Control), and CWE‑918 (Server‑Side Request Forgery).

Affected Systems

The vulnerability affects the @better-auth/sso plugin and the Better Auth library. All installations running a version earlier than 1.6.11 are susceptible. Upgrading to v1.6.11 or later removes the flaw, as the update introduces origin validation for the provided endpoints and enforces stricter checks on the OIDC provider registration process.

Risk and Exploitability

With a CVSS score of 9.6 the flaw is considered Critical, indicating a high impact if exploited. The EPSS score of less than 1% suggests that the probability of exploitation at the current time is low, but the presence of a well‑defined attack vector—namely the uncontrolled registration of a new SSO provider—means that once an attacker obtains the ability to craft a registration request, they can perform SSRF against any reachable service. The vulnerability is not listed in the CISA KEV catalog, but its severity warrants immediate attention. Exploitation would typically involve an attacker sending a specially crafted POST request to /sso/register or /sso/update-provider with a skipDiscovery flag set and malicious endpoint URLs, which the application then follows during the callback.

Generated by OpenCVE AI on July 31, 2026 at 03:12 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to Better Auth v1.6.11 or later to apply the origin validation fix
  • Disable the skipDiscovery option or enforce strict origin checks for oidcConfig values
  • Configure trustEmailVerified to false or restrict provider registration to trusted administrators
  • Review existing ssoProvider entries for unauthorized or suspicious endpoints and delete any that are not legitimate

Generated by OpenCVE AI on July 31, 2026 at 03:12 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-5rr4-8452-hf4v @better-auth/sso provider registration has server-side request forgery via unvalidated OIDC endpoints
History

Thu, 23 Jul 2026 22:45:00 +0000

Type Values Removed Values Added
First Time appeared Better-auth
Better-auth better Auth
Vendors & Products Better-auth
Better-auth better Auth

Wed, 15 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 15 Jul 2026 17:30:00 +0000

Type Values Removed Values Added
Description Better Auth is an authentication and authorization library for TypeScript. Prior to 1.6.11, the @better-auth/sso plugin's POST /sso/register and POST /sso/update-provider endpoints accept attacker-controlled oidcConfig.userInfoEndpoint, tokenEndpoint, and jwksEndpoint URLs when skipDiscovery: true is set, store them on the ssoProvider row without origin validation, and fetch them during OIDC callback, allowing non-blind server-side request forgery and possible account linking when trustEmailVerified: true is configured. This issue is fixed in version 1.6.11.
Title Better Auth: Server-side request forgery via unvalidated OIDC endpoints on @better-auth/sso provider registration
Weaknesses CWE-20
CWE-345
CWE-441
CWE-918
References
Metrics cvssV3_1

{'score': 9.6, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N'}


Subscriptions

Better-auth Better Auth
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-15T19:29:02.266Z

Reserved: 2026-06-09T17:30:33.455Z

Link: CVE-2026-53513

cve-icon Vulnrichment

Updated: 2026-07-15T19:28:56.523Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T03:15:04Z

Weaknesses
  • CWE-20

    Improper Input Validation

  • CWE-345

    Insufficient Verification of Data Authenticity

  • CWE-441

    Unintended Proxy or Intermediary ('Confused Deputy')

  • CWE-918

    Server-Side Request Forgery (SSRF)