better-auth is vulnerable to Improper Authentication
53
CVE Score
Medium
Improper Authentication
The getSessionCookie helper reads session tokens from incoming request cookies for middleware and integrations. When both a non-secure and a __Secure- prefixed session cookie were present, the helper preferred the non-secure value and could return a stale leftover token instead of the current secure session. Applications relying on getSessionCookie could therefore treat an outdated session as active after HTTPS or secure-cookie rollout. The fix prefers the __Secure- prefixed cookie and only falls back to the non-secure name when the secure value is absent.
Upgrade the better-auth library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and your deployment can send both a non-secure and a __Secure- prefixed session cookie in the same request.
1.2.5 - 1.6.13
Fixed in 1.6.14better-auth is vulnerable to Improper Authentication in versions 1.2.5 - 1.6.13.
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.