Intel

AIKIDO-2025-10682

better-auth is vulnerable to Authorization Bypass Through User-Controlled Key

Authorization Bypass Through User-Controlled Key Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Oct 9, 2025

82

High Risk

This Affects:

JSbetter-auth
1.2.0 - 1.3.25
Fixed in 1.3.26
Are you affected? Scan for Free

TL;DR

Affected versions of this package are vulnerable to authentication bypass due to an improper authorization check. The original code incorrectly set authRequired to false when ctx.body.userId was present, allowing API requests to potentially skip session validation by providing a user ID in the request body. An attacker could exploit this vulnerability by crafting requests with a malicious userId payload, thereby bypassing session checks and potentially gaining unauthorized access to other user accounts or performing privileged actions.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

better-auth is vulnerable to Authorization Bypass Through User-Controlled Key in versions 1.2.0 - 1.3.25.

How to fix this

Upgrade the better-auth library to the patch version.