/

CVE-2026-126454

Severity:

HIGH RISK

(8.1)

Insufficient TOTP Rate Limiting (CWE-307) in OpenEMR

CVE-2026-126454

Analyzed

Vulnerability type

Category:

Brute-Force Protection Failure

CWE:

CWE-307

Impact:

Multi-Factor Authentication Bypass and Account Takeover

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

OpenEMR does not sufficiently limit repeated TOTP submissions, allowing an attacker with a valid password to make repeated attempts to guess the six-digit MFA code. If the application is reachable and these attempts are not throttled or locked out, an attacker may bypass MFA and access the account.

Affected context

The issue affects OpenEMR authentication paths that accept TOTP codes without effective rate limiting or lockout. The described paths include main_screen.php and the OAuth2 authorization flow, where hidden credentials may be resubmitted with repeated requests. OpenEMR versions before 8.5.0 are identified as affected.

Exploit preconditions

  • Attack surface: An OpenEMR login or OAuth2 authorization endpoint reachable by the attacker
  • Required access: A valid account password
  • Trigger point: Repeated TOTP submissions during authentication
  • Why exploitation is possible: Attempts are not sufficiently rate-limited or locked out, allowing automated guessing of the six-digit code

Why this happens

The application does not adequately restrict the rate of authentication attempts involving TOTP. This maps to CWE-307: Improper Restriction of Excessive Authentication Attempts. Without effective throttling, lockout, or equivalent controls, an attacker who has a valid password can repeatedly submit candidate MFA codes.

Potential impact

  • An attacker may bypass the account's MFA protection
  • Unauthorized access to the affected user's account could occur
  • Sensitive patient or operational information could be exposed or altered, depending on account privileges
  • A compromised account could be used to access additional application functions

General mitigation guidance

Mitigations generally focus on limiting repeated authentication attempts consistently across all login and authorization flows.

  • Apply rate limits and progressive delays to failed TOTP attempts
  • Use bounded lockout or step-up verification controls that resist automated guessing while accounting for denial-of-service risks
  • Avoid relying on client-side state or resubmitted hidden credentials to enforce authentication policy
  • Apply controls consistently across web and OAuth2 authentication paths
  • Keep MFA and application privileges scoped to the user's needs

How teams detect issues like this

Detection approaches may include:

  • Monitoring for repeated failed TOTP attempts across accounts, sessions, and source addresses
  • Reviewing authentication handlers for missing throttling, lockout, or shared attempt counters
  • Using static analysis and code review to identify MFA verification paths without server-side attempt controls
  • Enforcing authentication policies in tests and CI checks, including coverage of alternate OAuth2 and web login flows
  • Reviewing logs for unusually high request rates or repeated authorization attempts

Sources

SourceLink
github.comgithub.com/openemr/openemr/security/advisories/GHSA-rp7c-25mm-8g74
vulncheck.comvulncheck.com/advisories/openemr-before-8.5.0-totp-brute-force-via-main-screen-php-and-oauth2

Frequently asked

questions

It may be exploitable over the network when the relevant OpenEMR authentication endpoint is reachable and an attacker has a valid password.

The described attack requires a valid password for the target account, but not prior access to its TOTP code.

Enforce server-side limits on failed TOTP attempts across every authentication flow, using throttling, delays, or bounded lockout controls.

Treat MFA verification as a security-sensitive authentication boundary, apply consistent attempt limits across all entry points, and test those controls in automated security checks.

Find out what's already
exploitable in your codebase.