better-auth is vulnerable to Origin Validation Error
31
CVE Score
Low
Origin Validation Error
The passkey plugin built into better-auth passes the origin of the incoming request to WebAuthn verification instead of using a configured origin, and does not enforce the user verification flag when authenticatorSelection.userVerification is set to "required". A passkey response created on another origin under the same relying party ID (e.g. a sibling subdomain) can be accepted, and passkeys can be registered or used without the PIN or biometric check the application requires. It does not allow registering a passkey for another user's account or skipping the sign-in needed to register one. The fix takes the expected origin from the origin option (or the baseURL origin plus exact trustedOrigins entries) and requires user verification when configured.
Upgrade the better-auth library to the patch version. If you keep using passkeys, move to the standalone @better-auth/passkey package at version 1.7.16 or later, and set the origin option when rpID is set and a wildcard in baseURL.allowedHosts covers it.
You are affected if you use the built-in passkey plugin of a better-auth version within the vulnerable range and either set authenticatorSelection.userVerification to "required", or your relying party ID also covers origins you do not control, such as other subdomains. The default "preferred" setting allows responses without user verification by design.
1.2.0 - 1.3.34
Fixed in 1.4.0better-auth is vulnerable to Origin Validation Error in versions 1.2.0 - 1.3.34.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.