/

CVE-2026-32246

Severity:

HIGH RISK

(8.5)

Authentication Bypass in Tinyauth OIDC Authorization

CVE-2026-32246

Analyzed

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287

Impact:

Bypass of Multi-Factor Authentication and Unauthorized Account Access

Severity:

HIGH RISK

(8.5)

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

An authentication bypass vulnerability in Tinyauth's OIDC authorization endpoint allows users with only password-verified, TOTP-pending sessions to obtain authorization codes and tokens.

If an attacker knows a user's password but not their TOTP secret, they can still acquire valid OIDC tokens and effectively bypass the second factor of authentication.

Affected context

The vulnerability occurs in Tinyauth deployments that use its OpenID Connect (OIDC) authorization endpoint with multi-factor authentication (MFA) based on TOTP.

Specifically, it affects flows where:

  • The user has successfully verified their password (first factor)
  • The session is in a TOTP-pending state (second factor not yet completed)
  • The OIDC authorization endpoint incorrectly treats this partially authenticated state as sufficient to issue authorization codes.

Exploit preconditions

  • Attack surface: Public-facing OIDC authorization endpoint exposed to the internet.
  • Required access: Knowledge of the victim's username and password; no access to the TOTP secret or device is needed.
  • Trigger point: Initiating an OIDC authorization flow and completing only the password step, leaving the session in a TOTP-pending state.
  • Why exploitation is possible: The authorization endpoint authorizes requests based solely on password-verified sessions, failing to enforce completion of the TOTP step before issuing authorization codes and tokens.

Why this happens

This issue stems from improper authentication state validation in the OIDC authorization flow, mapping to CWE-287: Improper Authentication.

The system treats a session that has passed only the first factor (password) as sufficiently authenticated for OIDC authorization, instead of requiring that all configured factors (including TOTP) be completed.

Conceptually, this is an insecure pattern where partial authentication states are not distinguished from fully authenticated states when making authorization decisions or issuing tokens.

Potential impact

  • Attackers who know a user's password may obtain valid OIDC authorization codes and tokens.
  • Complete bypass of the TOTP second factor, undermining the security guarantees of MFA.
  • Unauthorized access to applications and APIs relying on Tinyauth as their OIDC identity provider.
  • Potential account takeover and data exposure in relying-party applications.
  • Escalation to broader compromise if the affected accounts have administrative privileges.

General mitigation guidance

Effective mitigation focuses on enforcing complete authentication states before issuing tokens or authorization codes.

Recommended patterns include:

  • Ensuring that all authentication factors configured for a user (e.g., password + TOTP) must be successfully completed before an authentication session is considered valid for OIDC authorization.
  • Explicitly modeling and checking authentication state (e.g., unauthenticated, password_verified, mfa_verified) and using only fully authenticated states when generating codes or tokens.
  • Centralizing authentication checks in a single, reusable component to avoid inconsistencies between login flows and OIDC endpoints.
  • Applying least-privilege principles to tokens, including short lifetimes and strong audience/issuer validation, to limit the impact of any mis-issued token.
  • Providing secure defaults that always require MFA completion when configured, without relying on optional flags in downstream code paths.

How teams detect issues like this

Detection can focus on both code-level patterns and runtime behavior:

  • Code review and static analysis:
  • Look for OIDC authorization handlers that check only for "logged-in" or "password-verified" states without verifying MFA completion.
  • Identify multiple authentication states and verify that all token issuance paths require the strongest (fully authenticated) state.
  • Flag conditional logic that treats MFA as optional when it is configured as mandatory in policy.
  • Configuration and policy validation:
  • Enforce policies that require MFA for certain users, roles, or clients, and verify that OIDC flows cannot bypass these policies.
  • Runtime monitoring:
  • Log authentication events with clear markers for password and MFA completion, and correlate them with token issuance events.
  • Alert on tokens issued where no corresponding successful MFA event exists, especially for accounts configured with TOTP.
  • Automated code review or identity-focused security tools may assist in detecting inconsistent authentication state handling across endpoints.

Sources

SourceLink
github.comgithub.com/steveiliop56/tinyauth/security/advisories/GHSA-3q28-qjrv-qr39

Frequently asked

questions

It is significantly exploitable if an attacker can obtain a user's password through phishing, credential stuffing, or reuse from another breach. With only the password, the attacker can bypass TOTP and obtain valid OIDC tokens, leading to unauthorized access to relying-party applications.

No. The vulnerability specifically allows bypassing the TOTP second factor. An attacker only needs the victim's username and password to exploit the issue, provided the OIDC authorization endpoint is reachable.

The safest pattern is to treat MFA as an atomic requirement: a session should be marked "fully authenticated" only after all required factors have been successfully completed, and only that fully authenticated state must be accepted by the OIDC authorization endpoint and any token issuance logic.

Prevention strategies include clearly modeling authentication states, enforcing MFA completion before any token or session is treated as authoritative, centralizing authentication checks, adding tests for MFA-required flows, and using security reviews or automated checks to verify that all OIDC and login endpoints consistently require complete authentication.

Find out what's already
exploitable in your codebase.