OpenEMR Arbitrary File Read Vulnerability in PDF Generation

Vulnerability

A vulnerability allowing arbitrary file read has been identified in OpenEMR versions prior to 8.0.0.2. This issue arises in the PDF creation function of the Eye Exam form, where user responses are processed as unescaped HTML. As a result, an attacker can inject image files from the server into the generated PDF. Additionally, there is a high likelihood that this vulnerability could be exploited to read other types of files by manipulating PHP filter chains.

Impact

Exploitation of this vulnerability allows authenticated users with the 'Notes - my encounters' role to read arbitrary images from the server's filesystem, potentially including sensitive patient data. Furthermore, there is a high likelihood that other file types could be accessed by abusing PHP filter chains.

Reproduction

To reproduce this vulnerability, log into OpenEMR with a user assigned the 'Notes - my encounters' role, such as a member of the 'Clinicians' group. Navigate to the Eye Exam form within a patient encounter and insert a payload in the HPI field that includes an image tag referencing a file on the server. After saving the form, generate a PDF report which will include the injected image, demonstrating the arbitrary file read vulnerability.

Remediation

Users can update to OpenEMR version 8.0.0.2 or later, where this vulnerability has been fixed.

Added: Mar 19, 2026, 9:29 PM
Updated: Mar 19, 2026, 9:29 PM

Vulnerability Rating

Custom Algorithm
spread
4.5
impact
0.8
exploitability
6.2
remediation
7.7
relevance
4.1
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.