Critical cal.com Flaw Allows Attackers to Bypass Login Using Fake TOTP Codes

Cal.com has disclosed a critical authentication bypass vulnerability that exposes users to account takeover attacks by exploiting a fundamental flaw in its password verification logic.

Tracked as CVE-2025-66489 with a critical CVSS v4 score of 9.3, this vulnerability affects all versions of Cal.com up to and including 5.9.7. Users must immediately update to patched version 5.9.8 to mitigate the risk.

The flaw resides in the credentials provider’s authentication logic within the authorize() function in packages/features/auth/lib/next-auth-options.ts.

The vulnerability stems from problematic conditional logic that bypasses password verification whenever a TOTP (Time-based One-Time Password) code is provided, regardless of whether the code is valid.

PropertyDetails
CVE IDCVE-2025-66489
Vulnerability TypeAuthentication Bypass via Incorrect Implementation of Authentication Algorithm
Weakness IDCWE-303
SeverityCritical (CVSS v4: 9.3)
Affected VersionsCal.com up to and including 5.9.7
Fixed VersionCal.com 5.9.8
ReporterJaydns (Security Researcher)
ImpactComplete account takeover, credential theft, unauthorized access

Attack Vectors and Exploitation Scenarios

The vulnerability creates two distinct attack scenarios with severe implications.

First scenario: Attackers can completely bypass both password and TOTP verification by submitting any non-empty value in the totpCode field alongside the victim’s email address.

This affects the vast majority of Cal.com users who haven’t enabled two-factor authentication, making account takeover trivial for threat actors with minimal effort.

Second scenario: For users with 2FA enabled, the vulnerability operates differently but remains dangerous.

When a TOTP code is provided, the authentication system bypasses password verification entirely and only validates the TOTP code.

This effectively reduces multi-factor authentication to single-factor authentication, substantially weakening the security posture for accounts that should be better protected.

The flawed logic occurs at lines 179-187 of the authentication file. The conditional statement evaluates whether a user has a password hash and whether a TOTP code was provided.

When totpCode is present in the request, the condition evaluates to false, causing the password verification step using the verifyPassword function to be skipped entirely.

The authentication flow then proceeds without properly validating user credentials, allowing unauthorized access.

This vulnerability poses severe risks to Cal.com’s user base, potentially exposing sensitive information such as calendars, meeting links, scheduling data, and personal user information.

Attackers could exploit this flaw for user enumeration, account impersonation, and unauthorized access to privileged accounts.

The ease of exploitation combined with the critical severity rating makes this an urgent threat requiring immediate remediation.

Cal.com has released version 5.9.8 to address this critical security flaw. The patch implements proper verification of both password and TOTP codes in the authentication flow, ensuring multi-factor authentication operates as originally designed.

Organizations and individual users running affected versions must immediately upgrade to the patched release to protect against potential exploitation.

Security advisories are available through Cal.com’s official GitHub security repository for additional technical details.

Find this Story Interesting! Follow us on Google News, LinkedIn and X to Get More Instant Updates

AnuPriya
AnuPriya
Any Priya is a cybersecurity reporter at Cyber Press, specializing in cyber attacks, dark web monitoring, data breaches, vulnerabilities, and malware. She delivers in-depth analysis on emerging threats and digital security trends.

Trending News

Related Stories