/

CVE-2026-23478

Severity:

CRITICAL RISK

(9.8)

Broken Authentication and Session Management in Cal.com

CVE-2026-23478

Analyzed

Vulnerability type

Category:

Broken Authentication and Session Management

CWE:

CWE-602, CWE-639

Impact:

Full Account Takeover / Authentication Bypass

Severity:

CRITICAL RISK

(9.8)

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 Cal.com's custom NextAuth JWT callback allows an attacker to assume any user's identity by updating the session with an arbitrary target email address.

When exploited, this logic issue grants full authenticated access to victim accounts without needing their credentials, as long as the attacker can trigger the vulnerable session.update() logic.

Affected context

This vulnerability affects Cal.com deployments using versions from 3.1.6 up to, but not including, 6.0.7 where:

  • Authentication is handled via NextAuth with a customized JWT callback.
  • The application trusts client-supplied values (such as email) during session.update() operations.
  • Session identity is derived from mutable claims rather than a server-controlled principal or immutable identifier.

It becomes relevant in environments where attackers can trigger session updates or influence the data passed into the JWT/session callback.

Exploit preconditions

  • Attack surface: Web application authentication/session layer exposed over HTTP(S).
  • Required access: Ability to interact with the application as any user (including anonymous or low-privilege accounts) and invoke the NextAuth session update flow.
  • Trigger point: A call to session.update() or similar session-refresh mechanism that passes a target email address into the custom JWT callback.
  • Why exploitation is possible: The JWT callback logic fails to re-verify that the email used to identify the session owner belongs to the authenticated principal. Instead, it effectively trusts the client-controlled email and binds the session to whatever account matches that address.

Why this happens

The core issue is a broken authorization and identity-binding design in the custom NextAuth JWT callback, aligning with CWE-639: Authorization Bypass Through User-Controlled Key and influenced by CWE-602: Client-Side Enforcement of Server-Side Security.

The callback appears to:

  • Accept client-supplied identity attributes (such as email) from session.update().
  • Use this mutable attribute as the key to look up or construct the authenticated user context.
  • Fail to enforce a server-side check that the requested identity matches the already authenticated principal.

In effect, the system uses a client-controlled identifier as the authoritative account selector, rather than tying the session to a server-validated user ID and validating any changes against existing authentication state.

Potential impact

  • Full account takeover of arbitrary Cal.com users by specifying their email address.
  • Unauthorized access to private scheduling data, meeting details, and associated PII.
  • Ability to modify victim configuration, availability, integrations, and booking links.
  • Potential lateral impact if compromised accounts are integrated with external systems (e.g., calendars, video providers, CRMs).
  • Reputational damage and privacy violations due to impersonation and data exposure.

General mitigation guidance

Resilient fixes focus on server-side ownership checks and immutable identity binding:

  • Treat the user identifier (e.g., internal user ID) as an immutable server-side field that cannot be altered via client-controlled operations like session.update().
  • Ensure the JWT callback derives user identity strictly from verified authentication facts (e.g., provider user ID, subject claim) rather than accepting arbitrary email or ID values from the client.
  • Perform explicit authorization checks when updating session attributes, confirming that changes are allowed for the current authenticated principal.
  • Avoid using email (or other user-controlled, guessable fields) as the sole authoritative account key; use stable, internal identifiers.
  • Minimize sensitive logic in client-controlled flows; always enforce access control on the server regardless of client-side checks.

These patterns reduce the risk of future account-takeover bugs in authentication and session logic.

How teams detect issues like this

Detection can target both code and runtime behavior:

  • Static analysis / code review:
  • Flag custom authentication or JWT callback code that:
  • Uses client-supplied fields (like email or userId from request/session updates) to directly look up user records.
  • Updates the session's user identity based on mutable client-side input without re-authentication.
  • Look for patterns where session.update(), or equivalent functions, accept arbitrary user identifiers.
  • Review any customization of NextAuth callbacks (jwt, session) for client-controlled identity changes.
  • Runtime / logging analysis:
  • Monitor logs for frequent switches in session-associated email or user IDs within a single browser session or IP.
  • Alert on unusual patterns where a single source accesses many distinct user accounts in a short period.
  • Policy enforcement:
  • Establish guidelines requiring that identity claims used for authorization be derived from server-controlled sources.
  • Use automated review tools to enforce rules around session and JWT mutation logic before merge.

Sources

SourceLink
github.comgithub.com/calcom/cal.com/security/advisories/GHSA-7hg4-x4pr-3hrg

Frequently asked

questions

The flaw is broadly exploitable wherever an attacker can reach the authentication flow and trigger session.update() or a similar mechanism that passes arbitrary emails into the JWT callback. No prior knowledge beyond a victim's email address and access to the application is typically required.

No. The attacker needs the ability to interact with the application and supply an email in the vulnerable session update flow. The vulnerability allows them to bind their session to any account identified by that email without possessing the actual user's password or OAuth tokens.

The safest pattern is to strictly bind sessions to a server-verified, immutable user identifier and ensure that any identity-related changes require re-authentication or strong server-side verification. Session update operations should only modify non-identity attributes and must never allow switching the underlying account.

Design authentication and session systems around server-enforced invariants: identity keys are immutable, authorization decisions are never delegated to client logic, and any custom callbacks are reviewed with an "untrusted client" mindset. Combine these design rules with automated checks and security-focused code review for all authentication-related changes.

Find out what's already
exploitable in your codebase.