GHSA-wmjr-v86c-m9jj: Better auth Better Auth's Multi-session Sign-out Hook Vulnerability

LOW
CWE-287 CWE-345
Published
Advisory Summary

GHSA-wmjr-v86c-m9jj is a LOW better auth's multi-session sign-out hook vulnerability (CWE-287: Improper Authentication) affecting Better auth libraries in the npm ecosystem. The issue involves better auth's multi-session sign-out hook allows forged cookies to revoke arbitrary sessions. Remediation is available by upgrading affected packages to version 1.4.0.

GHSA-wmjr-v86c-m9jj at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-wmjr-v86c-m9jj
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-287: Improper Authentication
Affected Product Better auth
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-wmjr-v86c-m9jj

To remediate this vulnerability, upgrade all affected Better auth dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

better-auth fixed: 1.4.0
npm install better-auth@1.4.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls better-auth

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-wmjr-v86c-m9jj, inspect your project dependencies using npm:

npm ls better-auth

Analyze the terminal output to locate any version of Better auth in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.0), your application is affected.

Note: The npm ls better-auth command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Better auth, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary A vulnerability was identified in the multi-session plugin for Better Auth, specifically in the /sign-out after-hook. The hook trusts raw multi-session cookies and forwards the extracted values directly to internalAdapter.deleteSessions without verifying the cookie signature. Because cookie values are not validated with getSignedCookie (or any equivalent check), an attacker can supply a forged _multi-* cookie to trigger deletion of arbitrary session tokens.

GHSA-wmjr-v86c-m9jj Affected Better auth Versions

1 component(s)
Fixed Versions:
1.4.0
Product / Package Ecosystem Affected Versions Fixed Version
better-auth
npm
≥ 1.3.34
< 1.4.0
1.4.0

References

Frequently Asked Questions

What is GHSA-wmjr-v86c-m9jj?
GHSA-wmjr-v86c-m9jj is a security vulnerability in Better auth involving Better Auth's multi-session sign-out hook allows forged cookies to revoke arbitrary sessions under CWE-287: Improper Authentication.
Which Better auth versions are affected?
Affected versions include releases prior to 1.4.0 across affected packages: better-auth.
What version fixes GHSA-wmjr-v86c-m9jj?
Upgrading to 1.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is better-auth affected?
Yes, better-auth is affected in releases prior to 1.4.0. Upgrade your dependency to 1.4.0 or later.
What CWE is associated with GHSA-wmjr-v86c-m9jj?
GHSA-wmjr-v86c-m9jj is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check npm dependencies for GHSA-wmjr-v86c-m9jj?
Run the dependency tree command: 'npm ls better-auth'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wmjr-v86c-m9jj",
  "modified" : "2026-05-08T01:19:47Z",
  "published" : "2025-11-26T22:11:50Z",
  "aliases" : [ ],
  "summary" : "Better Auth's multi-session sign-out hook allows forged cookies to revoke arbitrary sessions",
  "details" : "### Summary\n\nA vulnerability was identified in the multi-session plugin for Better Auth, specifically in the /sign-out after-hook. The hook trusts raw multi-session cookies and forwards the extracted values directly to internalAdapter.deleteSessions without verifying the cookie signature. Because cookie values are not validated with getSignedCookie (or any equivalent check), an attacker can supply a forged _multi-* cookie to trigger deletion of arbitrary session tokens.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:P/VC:L/VI:L/VA:L/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "better-auth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.3.34"
      }, {
        "fixed" : "1.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/better-auth/better-auth/security/advisories/GHSA-wmjr-v86c-m9jj"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/better-auth/better-auth/commit/cfc453a2a6eb02951f9a0a7c944064936e73eee8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/better-auth/better-auth"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/better-auth/better-auth/releases/tag/v1.4.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287", "CWE-345" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-11-26T22:11:50Z",
    "nvd_published_at" : null
  }
}