OpenEMR Stored Cross-Site Scripting Vulnerability in Eye Exam Form

Vulnerability

A stored cross-site scripting vulnerability has been identified in OpenEMR versions prior to 8.0.0.2. Users with the 'Notes - my encounters' role can inject arbitrary JavaScript into Eye Exam form answers, which is then executed when the form is viewed in patient encounters or visit history. This vulnerability allows for session hijacking, execution of unauthorized actions, or exfiltration of sensitive information, such as patient records and credentials.

Impact

This vulnerability allows any authenticated user with the 'Notes - my encounters' role to inject and execute arbitrary JavaScript in the context of the application, potentially leading to session hijacking, execution of unauthorized actions, or exfiltration of sensitive information, including patient records and credentials.

Reproduction

To reproduce this vulnerability, log into OpenEMR with a user that has the 'Notes - my encounters' role. Create or select a patient, then access the Eye Exam form during a visit. Insert a malicious payload, such as an image tag with an 'onerror' event, into the HPI field and save the form. The injected script will execute when the encounter is viewed or printed.

Remediation

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

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

Vulnerability Rating

Custom Algorithm
spread
4.5
impact
1.7
exploitability
6.0
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.