CVE-2025-43860

7.6 HIGH

📋 TL;DR

OpenEMR versions before 7.0.3.4 have a stored XSS vulnerability where authenticated users with patient editing privileges can inject malicious JavaScript into address fields. This allows attackers to execute arbitrary code in victims' browsers when they view or edit patient data. All OpenEMR installations with vulnerable versions are affected.

💻 Affected Systems

Products:
  • OpenEMR
Versions: All versions prior to 7.0.3.4
Operating Systems: All platforms running OpenEMR
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated user with patient creation/editing privileges

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal healthcare provider credentials, access sensitive patient data, modify medical records, or pivot to other systems within the network.

🟠

Likely Case

Attackers with legitimate patient editing access could create persistent phishing pages, steal session cookies, or deface patient records.

🟢

If Mitigated

With proper input validation and output encoding, malicious scripts would be neutralized before execution.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated access but is straightforward once access is obtained

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 7.0.3.4

Vendor Advisory: https://github.com/openemr/openemr/security/advisories/GHSA-2h9p-7vmc-wmqv

Restart Required: Yes

Instructions:

1. Backup your OpenEMR installation and database
2. Download OpenEMR 7.0.3.4 or newer from official repository
3. Replace vulnerable files with patched versions
4. Restart web server services
5. Verify functionality

🔧 Temporary Workarounds

Input Validation Filter

all

Implement server-side input validation to sanitize address field inputs

Modify patient demographics processing scripts to strip/escape HTML/JavaScript from address fields

Output Encoding

all

Apply proper output encoding when displaying address field data

Implement HTML entity encoding for all user-controlled data displayed in web interface

🧯 If You Can't Patch

  • Restrict patient creation/editing privileges to only essential personnel
  • Implement web application firewall (WAF) rules to block XSS payloads in address fields

🔍 How to Verify

Check if Vulnerable:

Check OpenEMR version in admin interface or by examining source files for version markers

Check Version:

Check /sites/default/sqlconf.php or admin interface for version number

Verify Fix Applied:

Test address fields with basic XSS payloads like <script>alert('test')</script> and verify they are properly sanitized

📡 Detection & Monitoring

Log Indicators:

  • Unusual JavaScript patterns in address field submissions
  • Multiple failed XSS attempts in web server logs
  • Suspicious patient record modifications

Network Indicators:

  • HTTP requests containing script tags in address field parameters
  • Unusual outbound connections from OpenEMR server

SIEM Query:

web.url:*patient* AND (web.param:*<script* OR web.param:*javascript:* OR web.param:*onload=*)

🔗 References

📤 Share & Export