CVE-2025-29789

7.5 HIGH

📋 TL;DR

OpenEMR versions before 7.3.0 contain a directory traversal vulnerability in the Load Code feature that allows attackers to read arbitrary files on the server. This affects all OpenEMR installations running vulnerable versions. The vulnerability could expose sensitive medical records and system configuration files.

💻 Affected Systems

Products:
  • OpenEMR
Versions: All versions prior to 7.3.0
Operating Systems: All platforms running OpenEMR
Default Config Vulnerable: ⚠️ Yes
Notes: All OpenEMR installations with the Load Code feature enabled are vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could read sensitive patient health records, system configuration files containing credentials, and other protected data, potentially leading to data breaches and regulatory violations.

🟠

Likely Case

Unauthorized access to configuration files, source code, or other sensitive files stored on the server, potentially enabling further attacks.

🟢

If Mitigated

Limited impact with proper file permissions and network segmentation, though the vulnerability still exists.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires access to the Load Code feature, which typically requires authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 7.3.0

Vendor Advisory: https://github.com/openemr/openemr/security/advisories/GHSA-ffpq-2wqj-v8ff

Restart Required: No

Instructions:

1. Backup your OpenEMR installation and database. 2. Download OpenEMR version 7.3.0 or later from the official repository. 3. Follow the OpenEMR upgrade documentation to apply the update. 4. Verify the patch is applied by checking the version.

🔧 Temporary Workarounds

Disable Load Code Feature

all

Temporarily disable the vulnerable Load Code feature if immediate patching is not possible.

Restrict File Permissions

Linux/Unix

Set strict file permissions on sensitive directories to limit what can be accessed.

chmod 600 /path/to/sensitive/files
chown root:root /path/to/sensitive/files

🧯 If You Can't Patch

  • Implement strict network access controls to limit who can access the OpenEMR interface.
  • Deploy a web application firewall (WAF) with rules to detect and block directory traversal attempts.

🔍 How to Verify

Check if Vulnerable:

Check if your OpenEMR version is below 7.3.0 by examining the version in the interface or configuration files.

Check Version:

grep -i 'version' /path/to/openemr/interface/login/login.php | head -1

Verify Fix Applied:

Confirm the version is 7.3.0 or higher and test the Load Code feature with traversal attempts to ensure it's blocked.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file access patterns in web server logs, especially requests containing '../' sequences to the Load Code endpoint.

Network Indicators:

  • HTTP requests with directory traversal payloads (e.g., '../etc/passwd') to OpenEMR endpoints.

SIEM Query:

source="web_server_logs" AND uri="*load_code*" AND (uri="*../*" OR uri="*..\\*" OR uri="*%2e%2e%2f*")

🔗 References

📤 Share & Export