/

CVE-2026-53514

Severity:

HIGH RISK

(7.7)

AuthZ Bypass (CWE-287) in Better Auth Invitations

CVE-2026-53514

Analyzed

Vulnerability type

Category:

Authentication and Authorization Bypass

CWE:

CWE-287, CWE-345, CWE-441, CWE-862

Impact:

Unauthorized Account and Organization Access

Severity:

HIGH RISK

(7.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A flaw in Better Auth's organization invitation flow can allow users with unverified sessions to accept invitations by possessing an invitation ID and matching email address.

In configurations where invitation IDs can be obtained outside the invited mailbox and email verification on invitations is disabled, this can lead to unauthorized access to organizations and their resources.

Affected context

This vulnerability affects applications using Better Auth's organization plugin where:

  • The invitation flow relies on session.user.email plus an invitation ID as proof of invitation ownership, and
  • Invitation IDs may be obtainable via non-email channels (e.g., logs, APIs, screenshots, link sharing), and
  • requireEmailVerificationOnInvitation: true is not enabled, or equivalent protections are not enforced.

In such setups, the system treats a session with an unverified email as sufficiently bound to the invitation, even when the user has not demonstrated control of the invited mailbox.

Exploit preconditions

  • Attack surface: Organization invitation endpoints acceptInvitation, rejectInvitation, getInvitation, and listUserInvitations.
  • Required access: An application session where session.user.email matches the invited email value, but is not verified; and access to a valid invitation ID or enumeration path.
  • Trigger point: Invoking any of the affected endpoints with the invitation ID while logged in as a user whose email matches the invitation recipient.
  • Why exploitation is possible: The system uses a combination of session email and opaque invitation ID as de facto proof of ownership, without strongly verifying that the user controls the underlying email address, leading to insufficient authentication and trust in partially verified identity data.

Why this happens

The core issue stems from relying on weak identity binding between invitations and user sessions.

The organization plugin uses session.user.email plus an invitation ID to authorize access to invitation actions, but does not require that the email be verified for these operations in certain configurations.

This maps to CWE-287 (Improper Authentication) and CWE-345 (Insufficient Verification of Data Authenticity), as the system treats an unverified email as authentic proof of invitation ownership.

Additionally, CWE-441 (Unintended Proxy or Intermediary) and CWE-862 (Missing Authorization) concepts are implicated, because invitation actions are effectively authorized without robust checks that the requester legitimately controls the invited mailbox, allowing intermediaries or unrelated users to act on an invitation if they can obtain its ID.

Potential impact

  • Unauthorized acceptance of organization invitations by users who do not fully control the invited email address
  • Elevation of privileges within an organization (e.g., member or admin roles) without proper identity verification
  • Unauthorized access to organization data, projects, or internal resources tied to organization membership
  • Abuse of invitations to pivot into higher-value organizational accounts or shared environments
  • Confusion or account contention when the legitimate invited user later attempts to join the organization

General mitigation guidance

Effective mitigation focuses on strengthening identity verification and authorization around invitation handling:

  • Require email verification before allowing any invitation-related actions tied to an email address.
  • Treat invitation IDs as bearer tokens that must only be delivered through trusted channels (e.g., direct email to the intended recipient), and avoid exposing them in logs or low-trust interfaces.
  • Add explicit authorization checks that confirm both identity and invitation ownership (e.g., verifying a claim stored with the invitation and the verified email of the acting user).
  • Prefer designs where invitation acceptance requires an out-of-band verification step (such as clicking a secure, single-use link sent to the mailbox) instead of relying solely on session state.
  • Implement least-privilege defaults on invited roles and require secondary confirmation for high-privilege roles granted via invitations.

How teams detect issues like this

Detection approaches can combine code-level review with runtime monitoring:

  • Static analysis and code review: Look for authorization logic that couples session.user.email (or similar identity attributes) with tokens like invitation IDs without a preceding verification check, especially around invitation or membership flows.
  • Policy enforcement: Define internal guidelines requiring verified email or equivalent identity assurance for all invitation acceptance endpoints, and enforce these rules during pull-request reviews.
  • Logging and anomaly detection: Log invitation acceptance and rejection events including whether the acting user's email was verified, and monitor for patterns such as repeated acceptance attempts from unverified accounts or mismatched client contexts.
  • Automated testing: Add security-focused tests that simulate unverified users attempting to accept invitations with valid IDs, ensuring that such paths are rejected across the application.

Sources

SourceLink
github.comgithub.com/better-auth/better-auth/commit/23094a628f007f801be6d26e5b15dc5fc6fc4eb8
github.comgithub.com/better-auth/better-auth/pull/9577
github.comgithub.com/better-auth/better-auth/releases/tag/v1.6.11
github.comgithub.com/better-auth/better-auth/security/advisories/GHSA-fmh4-wcc4-5jm3

Frequently asked

questions

Yes. An attacker who can obtain valid invitation IDs and create or control sessions with matching unverified email addresses can exploit the issue over standard application interfaces, without local access.

The attacker needs the ability to sign up or authenticate with an email that matches an invited address (without needing to verify it in affected configurations) and access to a corresponding invitation ID or way to enumerate invitations.

The most robust fix is to require strong identity verification—typically verified email ownership—before allowing any invitation-related operations, and to ensure that invitation endpoints enforce explicit authorization checks that tie a verified identity to a specific invitation.

Adopt a security design principle that no sensitive action based on user identity (invitations, password resets, account linking) is allowed without explicit proof of identity control, apply centralized verification helpers in the auth layer, and back this with automated tests and reviews that focus on authentication and invitation flows.

Find out what's already
exploitable in your codebase.