/

CVE-2026-124445

Severity:

CRITICAL RISK

(9.8)

Authentication Brute Force (CWE-307) in OpenEMR OneTimeAuth

CVE-2026-124445

Analyzed

Vulnerability type

Category:

Authentication Brute Force

CWE:

CWE-307

Impact:

Unauthorized Patient-Portal Access and PHI Exposure

Severity:

CRITICAL RISK

(9.8)

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's one-time authentication flow does not enforce configured token-use limits or revoke tokens after use, and it checks login PINs without rate limiting or strict comparison. A person with a captured service_auth token may be able to replay it, while repeated PIN guesses could open a patient-portal session and expose protected health information (PHI).

Affected context

The flaw is in OpenEMR's src/Common/Auth/OneTimeAuth.php authentication flow. It affects deployments where service_auth tokens and login PINs are used to establish patient-portal sessions and the relevant token-use and PIN-check controls are not enforced.

Exploit preconditions

  • Attack surface: Patient-portal one-time authentication.
  • Required access: An attacker needs a captured service_auth token to attempt replay, or a way to submit repeated PIN guesses to the authentication flow.
  • Trigger point: Token validation and login PIN checking when establishing a portal session.
  • Why exploitation is possible: The flow ignores token-use limits, does not revoke consumed tokens, and does not adequately constrain PIN attempts or comparisons.

Why this happens

The authentication flow fails to enforce controls intended to limit token reuse and repeated PIN attempts. Ignoring enforce_onetime_use and max_access_count and leaving consumed tokens valid enables replay; checking PINs without rate limiting or strict comparison weakens resistance to guessing. The missing restriction on repeated authentication attempts maps to CWE-307: Improper Restriction of Excessive Authentication Attempts.

Potential impact

  • An attacker could replay a captured token to establish an unauthorized patient-portal session.
  • Repeated PIN guesses may allow account or session access.
  • Unauthorized sessions may expose PHI.
  • Access to portal functions could enable further privacy or integrity harm.

General mitigation guidance

Mitigation patterns include enforcing one-time-use and maximum-access policies on the server, revoking tokens immediately after successful use, and making token consumption atomic to prevent concurrent replay. Apply strict PIN comparison and bounded, monitored authentication attempts, with appropriate delays or lockout controls. Reduce trust in exposed tokens through short lifetimes and narrow scope, and limit the privileges and data available to portal sessions.

How teams detect issues like this

Review authentication code for ignored token-use settings, tokens that remain valid after consumption, non-strict credential comparisons, and PIN checks without effective attempt limits. Use static analysis and code review to identify repeated authentication paths that lack throttling or lockout controls. Monitor for repeated PIN failures, reuse of already-consumed tokens, unusual portal-session creation, and enforce policies for rate limits and token lifecycle behavior.

Sources

SourceLink
github.comgithub.com/openemr/openemr/security/advisories/GHSA-xg3m-9pfq-c8r6
vulncheck.comvulncheck.com/advisories/openemr-7.0.1-before-8.4.0-onetimeauth-token-replay-and-pin-brute-force

Frequently asked

questions

The affected flow is used for patient-portal authentication, so exploitation may be possible over the network when the portal is reachable and the necessary token or PIN-guessing conditions are met.

Token replay requires access to a captured service_auth token. PIN guessing requires the ability to submit repeated authentication attempts; the practical scope depends on deployment controls.

Enforce token-use limits, revoke tokens upon consumption, and apply strict PIN checks with effective server-side attempt limits.

Treat tokens as short-lived, single-use credentials; enforce rate limits on every authentication path; and test that configured security controls are actually applied.

Find out what's already
exploitable in your codebase.