better-auth is vulnerable to Authorization Bypass Through User-Controlled Key
82
High Risk
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.
You are affected if you are using a version that falls within the vulnerable range.
better-auth is vulnerable to Authorization Bypass Through User-Controlled Key in versions 1.2.0 - 1.3.25.
Upgrade the better-auth library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

SOC 2Compliant
ISO 27001Compliant