Vulnerability DatabaseGHSA-99h5-pjcv-gr6v

GHSA-99h5-pjcv-gr6v
Better Auth vulnerability analysis and mitigation

Overview

Better Auth, an authentication and authorization library for TypeScript, was found to contain a critical authentication bypass vulnerability (GHSA-99h5-pjcv-gr6v/CVE-2025-61928) affecting versions prior to 1.3.26. The vulnerability was discovered by ZeroPath and disclosed on October 9, 2025. The issue allows unauthenticated attackers to create or modify API keys for any user by exploiting a flaw in the authentication logic of the api-key plugin (GitHub Advisory, NVD).

Technical details

The vulnerability exists in the authentication logic when checking for user authentication. The code derives the user as session?.user ?? (authRequired ? null : { id: ctx.body.userId }). When no session exists but userId is present in the request body, authRequired becomes false and the user object is set to the attacker-controlled ID. Server-only field validation only executes when authRequired is true, allowing attackers to set privileged fields. The vulnerability received a CVSS v4.0 base score of 9.3 (Critical) with vector string CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N (GitHub Advisory).

Impact

This critical authentication bypass enables an unauthenticated attacker to generate an API key for any user and immediately gain complete authenticated access. The attacker can perform any action as the victim user using the API key, potentially compromising user data and the application depending on the victim's privileges (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in version 1.3.26 of Better Auth. Users should upgrade to this version or later to protect against this authentication bypass vulnerability (NVD).

Additional resources


SourceThis report was generated using AI

Related Better Auth vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-61928CRITICAL9.3
  • Better AuthBetter Auth
  • better-auth
NoYesOct 09, 2025
GHSA-x732-6j76-qmhmHIGH8.6
  • Better AuthBetter Auth
  • better-auth
NoYesDec 16, 2025
GHSA-99h5-pjcv-gr6vHIGH8.6
  • Better AuthBetter Auth
  • better-auth
NoYesOct 09, 2025
GHSA-569q-mpph-wgwwLOW2.9
  • Better AuthBetter Auth
  • better-auth
NoYesDec 01, 2025
GHSA-wmjr-v86c-m9jjLOW2
  • Better AuthBetter Auth
  • better-auth
NoYesNov 26, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management