# CVE-2026-53513: Better Auth: Server-side request forgery via unvalidated OIDC endpoints on @better-auth/sso provider registration

> Attackers can exploit unvalidated OIDC endpoints in Better Auth's SSO plugin to perform server-side request forgery and potentially link accounts.

- **Severity:** Critical 9.6 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Jul 2026
- **Updated:** 15 Jul 2026
- **Also known as:** GHSA-5rr4-8452-hf4v

## What is CVE-2026-53513?

CVE-2026-53513 is a critical server-side request forgery vulnerability in @better-auth better-auth, published on 15 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official 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.

Weakness: CWE-918 (Server-Side Request Forgery), CWE-441 (Unintended Proxy or Intermediary), CWE-345 (Insufficient Verification of Data Authenticity), CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2026-53513?

2 open source packages ship an affected version, including @better-auth/sso. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@better-auth/sso` | npm | From 0.1.0 | 1.6.11 |
| `@better-auth/sso` | npm | From 0.1.0 | 1.6.11 |

Products: Better-Auth Better-Auth\/Sso, Better-Auth Better Auth.

## How do I fix CVE-2026-53513?

Upgrade @better-auth/sso to 1.6.11 or later.

## Is CVE-2026-53513 being exploited?

There is no known exploitation of CVE-2026-53513 in the wild and no public exploit code.

## Other vulnerabilities in @better-auth better-auth

- [CVE-2026-53515](https://insights.sbomify.com/CVE-2026-53515/): Better Auth: Privilege escalation via SSO provider registration: missing admin role check in @better-auth/sso (high 7.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-53513 and fix it if it is affected.

What it is: CVE-2026-53513 is a critical server-side request forgery vulnerability in @better-auth better-auth, published on 15 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-53513 in the wild and no public exploit code.

Affected packages and fixed versions:
- @better-auth/sso (npm): affected from 0.1.0; fixed in 1.6.11
- @better-auth/sso (npm): affected from 0.1.0; fixed in 1.6.11

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-53513/ (Markdown: https://insights.sbomify.com/CVE-2026-53513/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-53513
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-53513
- OSV: https://osv.dev/vulnerability/CVE-2026-53513

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-53513/
Summaries are generated and may contain mistakes; the official description above is the record.
