CVE-2025-53535

CVE-2025-53535 is a low-severity open redirect vulnerability in better-auth (npm), affecting versions <= 1.2.9. It is fixed in 1.2.10.

Summary

An open redirect has been found in the originCheck middleware function, which affects the following routes: /verify-email, /reset-password/:token, /delete-user/callback, /magic-link/verify, /oauth-proxy-callback.

Details

In the matchesPattern function, url.startsWith( can be deceived with a url that starts with one of the trustedOrigins.

		const matchesPattern = (url: string, pattern: string): boolean => {
			if (url.startsWith("/")) {
				return false;
			}
			if (pattern.includes("*")) {
				return wildcardMatch(pattern)(getHost(url));
			}
			return url.startsWith(pattern);
		};

Open Redirect PoCs

export const auth = betterAuth({
	baseURL: 'http://localhost:3000',
	trustedOrigins: [
		"http://trusted.com"
	],
	emailAndPassword: {
		...
	},
})

/reset-password/:token


/verify-email


/delete-user/callback


/magic-link/verify


/oauth-proxy-callback


Impact

Untrusted open redirects in various routes.

Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites. Typical impact: phishing and credential harvesting via a trusted domain.

Affected versions

better-auth (<= 1.2.9)

Security releases

better-auth → 1.2.10 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade better-auth to 1.2.10 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-53535? CVE-2025-53535 is a low-severity open redirect vulnerability in better-auth (npm), affecting versions <= 1.2.9. It is fixed in 1.2.10. Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites.
  2. Which versions of better-auth are affected by CVE-2025-53535? better-auth (npm) versions <= 1.2.9 is affected.
  3. Is there a fix for CVE-2025-53535? Yes. CVE-2025-53535 is fixed in 1.2.10. Upgrade to this version or later.
  4. Is CVE-2025-53535 exploitable, and should I be worried? Whether CVE-2025-53535 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2025-53535 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2025-53535? Upgrade better-auth to 1.2.10 or later.

Other vulnerabilities in better-auth

CVE-2026-45364CVE-2025-61928CVE-2025-53535CVE-2025-27143CVE-2024-56734

Stop the waste.
Protect your environment with Kodem.