OpenEMR is a free and open source electronic health records and medical practice management application. In versions up to and including 8.0.0, an arbitrary file exfiltration vulnerability in the fax sending endpoint allows any authenticated user to read and transmit any file on the server (including database credentials, patient documents, system files, and source code) via fax to an attacker-controlled phone number. The vulnerability exists because the endpoint accepts arbitrary file paths from user input and streams them to the fax gateway without path restrictions or authorization checks. As of time of publication, no known patched versions are available.
OpenEMR versions up to 8.0.0 contain a critical arbitrary file exfiltration vulnerability in the fax sending endpoint that allows authenticated users to read and exfiltrate any server file including databases, patient records, and credentials via fax to attacker-controlled numbers. Despite a medium CVSS score, the vulnerability poses severe risk to healthcare organizations due to lack of path validation and authorization checks. No patches are currently available, requiring immediate compensating controls and access restrictions.
IMMEDIATE ACTIONS:
1. Disable or restrict access to fax sending endpoints in OpenEMR until patch availability
2. Implement network-level access controls limiting fax gateway communications to authorized destinations only
3. Audit all fax transmission logs for suspicious activity and unauthorized file access patterns
4. Review user access logs for the fax endpoint (typically /fax or /send_fax endpoints) for past 90 days
5. Rotate all database credentials and API keys that may have been exposed
COMPENSATING CONTROLS:
6. Implement Web Application Firewall (WAF) rules to block fax endpoint requests with path traversal patterns (../, ..\, encoded variants)
7. Deploy input validation at application layer to whitelist only approved file paths for fax transmission
8. Implement strict file access controls using OS-level permissions to restrict OpenEMR process access
9. Enable detailed logging and alerting for all fax endpoint access attempts
10. Segment healthcare networks to isolate OpenEMR systems from direct internet access
DETECTION RULES:
- Monitor for HTTP requests to fax endpoints containing path traversal sequences
- Alert on fax transmissions to phone numbers outside approved whitelist
- Track file access patterns from OpenEMR process to sensitive directories (/etc, /var/www, database files)
- Monitor for unusual outbound fax gateway connections
PATCHING STRATEGY:
- Monitor OpenEMR project for security updates (currently no patch available)
- Prepare upgrade plan for when patched version 8.0.1+ is released
- Consider migration to alternative EHR systems if patch timeline extends beyond 60 days
الإجراءات الفورية:
1. تعطيل أو تقييد الوصول إلى نقاط نهاية إرسال الفاكس في OpenEMR حتى توفر التصحيح
2. تنفيذ ضوابط الوصول على مستوى الشبكة لتحديد اتصالات بوابة الفاكس للوجهات المصرح بها فقط
3. تدقيق جميع سجلات نقل الفاكس للنشاط المريب وأنماط الوصول غير المصرح بها للملفات
4. مراجعة سجلات وصول المستخدم لنقطة نهاية الفاكس لآخر 90 يوماً
5. تدوير جميع بيانات اعتماد قاعدة البيانات ومفاتيح API التي قد تكون قد تعرضت
الضوابط التعويضية:
6. تنفيذ قواعد جدار حماية تطبيقات الويب (WAF) لحظر طلبات نقطة نهاية الفاكس بأنماط اجتياز المسارات
7. نشر التحقق من الإدخال على مستوى التطبيق لتبييض قائمة المسارات المعتمدة فقط لنقل الفاكس
8. تنفيذ ضوابط الوصول إلى الملفات على مستوى نظام التشغيل لتقييد وصول عملية OpenEMR
9. تفعيل السجلات التفصيلية والتنبيهات لجميع محاولات الوصول إلى نقطة نهاية الفاكس
10. تقسيم الشبكات الصحية لعزل أنظمة OpenEMR عن الوصول المباشر إلى الإنترنت
قواعد الكشف:
- مراقبة طلبات HTTP إلى نقاط نهاية الفاكس التي تحتوي على تسلسلات اجتياز المسارات
- تنبيه نقل الفاكس إلى أرقام هاتفية خارج القائمة البيضاء المعتمدة
- تتبع أنماط الوصول إلى الملفات من عملية OpenEMR إلى الدلائل الحساسة
- مراقبة اتصالات بوابة الفاكس الصادرة غير العادية
استراتيجية التصحيح:
- مراقبة مشروع OpenEMR للتحديثات الأمنية
- تحضير خطة الترقية عند إصدار نسخة مصححة
- النظر في الهجرة إلى أنظمة EHR بديلة إذا امتد الجدول الزمني للتصحيح