/

CVE-2026-33667

Severity:

HIGH RISK

(7.4)

Missing Brute-Force Protection in OpenProject 2FA

CVE-2026-33667

Analyzed

Vulnerability type

Category:

Missing Brute-Force Protection

CWE:

CWE-307

Impact:

2FA Bypass and Account Compromise

Severity:

HIGH RISK

(7.4)

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

OpenProject's two-factor authentication (2FA) verification flow lacked rate limiting, lockout, and failure tracking, leaving one-time passwords and backup codes vulnerable to brute-force guessing.

When an attacker already knows a user's password, they can repeatedly try 6-digit TOTP or backup codes without restriction, ultimately bypassing 2FA and taking over the account.

Affected context

This vulnerability affects OpenProject deployments prior to 17.3.0 that have two-factor authentication enabled.

It specifically involves the confirm_otp action in the two_factor_authentication module, where verification of TOTP and backup codes occurs after a successful password login.

The weakness manifests when the platform:

  • Allows unlimited OTP and backup code attempts without delay
  • Does not count 2FA failures toward any lockout policy
  • Uses a TOTP window that yields several valid codes at any given time

Exploit preconditions

  • Attack surface: Public-facing OpenProject login endpoint with 2FA enabled for target accounts.
  • Required access: Knowledge of the victim's username and valid password. No prior access to the victim's device or OTP secret is required.
  • Trigger point: The 2FA verification step (confirm_otp) for TOTP or backup codes after password authentication.
  • Why exploitation is possible: The 2FA stage:
  • Lacks rate limiting or exponential backoff
  • Does not enforce lockout after repeated failures
  • Does not track failed 2FA attempts

Combined with a 6-digit TOTP space and a drift window allowing multiple valid codes simultaneously, this makes systematic brute-force attempts feasible over time.

Why this happens

The core issue is a missing enforcement of authentication throttling and lockout controls during the second factor verification step, mapping directly to CWE-307: Improper Restriction of Excessive Authentication Attempts.

While OpenProject applies brute-force protection to password-based logins via brute_force_block_after_failed_logins, this control is not extended to the 2FA verification stage.

The fail_login and stage_failure methods do not increment any counters or trigger blocking, and there are no built-in delays between attempts.

As a result, the 2FA challenge functions as an unprotected oracle: an attacker can submit a large number of TOTP or backup codes in quick succession, leveraging the small numeric space (6 digits) and generous TOTP drift window to eventually guess a valid code.

Potential impact

  • Complete 2FA bypass for accounts where the password is already known
  • Full account takeover, including access to all projects and data accessible to the compromised user
  • Lateral movement within the organization if compromised accounts have elevated roles (e.g., admin, project manager)
  • Undermining of organizational security policies that rely on 2FA to protect sensitive workflows
  • Increased risk of successful credential-stuffing attacks being escalated into full compromise

General mitigation guidance

Effective mitigation focuses on enforcing consistent brute-force defenses across all authentication stages, not just the first factor.

Recommended patterns include:

  • Unified failure accounting: Ensure that failed 2FA (TOTP and backup code) attempts increment the same or a closely-associated failure counter used for password logins, allowing global lockout policies to apply.
  • Rate limiting and backoff: Apply per-account and per-IP rate limiting to 2FA endpoints, with incremental delays (e.g., exponential backoff) after repeated failures to make guessing impractical.
  • Lockout and notification: Introduce temporary account lockouts after a defined number of consecutive 2FA failures and notify the user when such events occur.
  • Consistent policy coverage: Treat OTP and backup code verification as security-critical authentication events, subject to the same or stricter brute-force protections as passwords.
  • Smaller verification windows: Consider tightening TOTP drift windows where operationally feasible, reducing the number of simultaneously valid codes.
  • Defense in depth: Combine server-side protections with anomaly detection and optional device or IP reputation checks to flag unusual patterns of 2FA failures.

How teams detect issues like this

Organizations can detect and monitor similar weaknesses using:

  • Static analysis and code search: Look for authentication flows, especially 2FA handlers, where:
  • No rate limiting or throttling middleware is applied
  • Failure handlers (fail_login, stage_failure, etc.) do not update counters or lockouts
  • OTP verification is implemented without calls to central authentication policy components
  • Code review checklists: Require reviewers to verify that any new or modified authentication step:
  • Integrates with global brute-force protection and lockout frameworks
  • Shares logging and metrics with the primary login flow
  • Runtime monitoring: Inspect authentication logs for patterns such as:
  • High-frequency OTP or backup code attempts over long periods
  • Many 2FA failures without corresponding account lockouts
  • Security testing and QA: Include automated tests that:
  • Simulate repeated 2FA failures and verify that rate limits and lockouts are triggered
  • Measure the maximum allowed attempt rate to ensure it meets policy requirements

Sources

SourceLink
github.comgithub.com/opf/openproject/security/advisories/GHSA-234r-45m2-w6cv

Frequently asked

questions

It is highly exploitable when an attacker has valid credentials for a target account. Given unlimited attempts and a 6-digit code space, brute-forcing a TOTP or backup code becomes a time-and-resource problem rather than a technical barrier.

No. The attacker only needs the correct username and password for a 2FA-enabled account. They can then systematically guess the 2FA code (TOTP or backup code) via the exposed verification endpoint.

Centralize authentication controls so that all verification stages—password, TOTP, backup codes, and any additional factors—use the same enforcement mechanisms for rate limiting, failure counting, and lockout. Ensure 2FA failure events are logged and increment shared counters just like password failures.

Treat every authentication factor as equally sensitive. At design time, mandate that:

  • All authentication-related endpoints are behind rate limiting and brute-force protection.
  • Failure handling and lockout logic is implemented once and reused across all factors.
  • Security tests explicitly verify that no authentication stage can be brute-forced independently, including backup and recovery mechanisms.
Find out what's already
exploitable in your codebase.