CVE-2021-25923
📋 TL;DR
OpenEMR versions 5.0.0 to 6.0.0.1 have weak password requirements that don't enforce maximum password length. This allows attackers who know the first 72 characters of a victim's password to perform account takeover attacks. Healthcare organizations using vulnerable OpenEMR installations are affected.
💻 Affected Systems
- OpenEMR
📦 What is this software?
Openemr by Open Emr
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of patient medical records, unauthorized access to sensitive healthcare data, and potential HIPAA violations through account takeover of administrative users.
Likely Case
Unauthorized access to patient records and medical data by attackers who have obtained partial password information through other means.
If Mitigated
No impact if proper password length limits are enforced and strong authentication controls are implemented.
🎯 Exploit Status
Requires knowledge of first 72 characters of victim's password, which could be obtained through password reuse, credential stuffing, or other attacks.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 6.0.0.2 and later
Vendor Advisory: https://github.com/openemr/openemr/commit/28ca5c008d4a408b60001a67dfd3e0915f9181e0
Restart Required: No
Instructions:
1. Upgrade OpenEMR to version 6.0.0.2 or later. 2. Apply the patch from commit 28ca5c008d4a408b60001a67dfd3e0915f9181e0. 3. Verify password length limits are now enforced.
🔧 Temporary Workarounds
Enforce Password Length Limits
allManually implement password length validation in authentication code
Modify authentication logic to reject passwords longer than 72 characters
🧯 If You Can't Patch
- Implement multi-factor authentication for all user accounts
- Enforce password rotation policies and monitor for suspicious login attempts
🔍 How to Verify
Check if Vulnerable:
Check OpenEMR version and test if passwords longer than 72 characters are accepted during account creation or password change.
Check Version:
Check OpenEMR version in administration interface or via database query
Verify Fix Applied:
Attempt to create or change a password longer than 72 characters - should be rejected with appropriate error message.
📡 Detection & Monitoring
Log Indicators:
- Multiple failed login attempts followed by successful login from same IP
- Unusual login times or locations for user accounts
Network Indicators:
- Brute force login attempts
- Credential stuffing traffic patterns
SIEM Query:
source="openemr" (event="login_failed" OR event="login_success") | stats count by src_ip, user
🔗 References
- https://github.com/openemr/openemr/commit/28ca5c008d4a408b60001a67dfd3e0915f9181e0
- https://www.whitesourcesoftware.com/vulnerability-database/CVE-2021-25923
- https://github.com/openemr/openemr/commit/28ca5c008d4a408b60001a67dfd3e0915f9181e0
- https://www.whitesourcesoftware.com/vulnerability-database/CVE-2021-25923