/

CVE-2026-32729

Severity:

HIGH RISK

(8.1)

Authentication and Authorization in Runtipi verify-totp

CVE-2026-32729

Analyzed

Vulnerability type

Category:

Authentication and Authorization

CWE:

CWE-307, CWE-799

Impact:

Two-Factor Authentication Bypass and Account Compromise

Severity:

HIGH RISK

(8.1)

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

The Runtipi TOTP verification endpoint allows unlimited verification attempts without rate limiting, attempt counting, or account lockout, enabling efficient brute-force attacks against 6-digit TOTP codes.

If an attacker has already obtained a user's primary credentials, they can systematically try all possible TOTP values and bypass two-factor authentication within a short period, effectively nullifying the protection provided by 2FA.

Affected context

This vulnerability affects Runtipi deployments where:

  • Users have two-factor authentication (2FA) enabled using 6-digit TOTP codes, and
  • The /api/auth/verify-totp endpoint is exposed over the network, and
  • Defaults are used that keep TOTP verification sessions cached for extended periods (e.g., 24 hours).

Under these conditions, once an attacker has valid username/password credentials for a target account, they can continuously send TOTP guesses without encountering throttling, lockout, or other protective controls.

Exploit preconditions

  • Attack surface: Network-accessible /api/auth/verify-totp endpoint (e.g., over the public internet or VPN).
  • Required access: Valid primary credentials for a user account (username/email and password), usually obtained via phishing, credential stuffing, or data breach.
  • Trigger point: Submission of repeated TOTP codes to the verification endpoint during the 2FA step.
  • Why exploitation is possible:
  • No rate limiting or per-account attempt tracking is enforced.
  • No temporary or permanent account lockout is triggered on repeated failures.
  • The TOTP verification cache/session persists for ~24 hours, giving ample time to iterate through up to 1,000,000 possible 6-digit codes at high request rates.

Why this happens

The core issue is the lack of controls that limit authentication attempts, categorized primarily as CWE-307: Improper Restriction of Excessive Authentication Attempts, with related aspects of CWE-799: Improper Control of Interaction Frequency.

The TOTP verification endpoint treats each code attempt independently and does not:

  • Track failed attempts per account, session, or source,
  • Enforce increasing delays after repeated failures, or
  • Lock or temporarily suspend verification after a threshold is reached.

This design assumes that the entropy of the 6-digit TOTP alone is sufficient, but without interaction limits, an attacker can systematically exhaust the entire code space within the lifetime of the verification session.

Potential impact

  • An attacker who has a user's primary credentials may bypass two-factor authentication.
  • Full compromise of affected user accounts, including access to personal data and administrative functions (depending on the account's privileges).
  • Escalation from a single credential theft incident to broader environment compromise if privileged accounts are targeted.
  • Erosion of trust in 2FA as a security control for the affected deployment.

General mitigation guidance

Practical mitigation focuses on limiting the rate and number of TOTP verification attempts and reducing the window in which brute force is feasible:

  • Introduce per-account and per-IP rate limiting on /api/auth/verify-totp, including short-term burst limits and longer-term quotas.
  • Track failed TOTP attempts and enforce lockout or step-up challenges after a small configurable number of failures (e.g., captchas, additional verification, or temporary account suspension).
  • Implement exponential backoff or progressive delays after each failed attempt to make large-scale guessing impractical.
  • Shorten the lifetime of 2FA verification sessions or cache entries so that an attacker cannot exhaust the full TOTP keyspace within a single session window.
  • Apply least-privilege principles to accounts, so that compromise of any single account has limited blast radius.
  • Communicate security guidance encouraging users to avoid password reuse and enable additional protective controls (e.g., hardware tokens) where possible.

How teams detect issues like this

Detection typically combines runtime monitoring, log analysis, and code-level checks:

  • Application logging & analytics:
  • Log all TOTP verification attempts with outcome (success/failure), account identifier, and client metadata (IP, user agent).
  • Monitor for anomalous patterns, such as high-frequency failed TOTP attempts for a single account or from a single source.
  • Create alerts for thresholds that suggest automated guessing (e.g., dozens or hundreds of attempts within short intervals).
  • Static and code review checks:
  • Verify that all authentication-related endpoints, including 2FA verification, integrate with a central rate-limiting and lockout mechanism.
  • Review for explicit checks on failed attempt counters and backoff logic around TOTP verification.
  • Use security linters or SAST tooling configured with rules for identifying authentication flows lacking rate limiting or failure tracking.
  • Operational controls:
  • Configure API gateways, reverse proxies, or WAFs to enforce generic rate limits and anomaly detection on authentication endpoints.

Sources

SourceLink
github.comgithub.com/runtipi/runtipi/security/advisories/GHSA-v6gf-frxm-567w

Frequently asked

questions

Yes. As long as the /api/auth/verify-totp endpoint is reachable over the network and an attacker has valid user credentials, they can perform the brute-force attack remotely without local access.

In practice, yes. The vulnerability is in the second factor step; an attacker must first pass the primary authentication stage using a valid username/password combination before they can start brute-forcing the TOTP code.

Implement a centralized authentication protection layer that applies to all login and 2FA endpoints, including:

  • Per-account and per-source rate limiting,
  • Explicit tracking of failed attempts,
  • Temporary or permanent lockout thresholds, and
  • Progressive delays after failures.

Ensuring that these controls are configurable and consistently enforced across all authentication workflows is key.

When designing or reviewing authentication flows, treat rate limiting and lockout as mandatory requirements, not optional enhancements. Define security non-functional requirements that all new endpoints must:

  • Integrate with a shared throttling and abuse-detection framework,
  • Be covered by automated tests verifying attempt-limiting behavior, and
  • Be subject to security review focusing on brute-force resistance, including for 2FA and recovery flows.
Find out what's already
exploitable in your codebase.