CVE-2026-46518: OpenEMR stored XSS in prescription multi-print via patient demographics

CVE-2026-46518 · Severity: high · CVSS 7.7 · Published 2026-06-10

OpenEMR is an open-source medical practice management and electronic health records platform. A security flaw allows malicious patients to inject malicious code into their own profile information by bypassing the standard review process. When a healthcare provider later attempts to print a prescription for that patient using specific templates, the malicious code executes in the provider's browser, potentially allowing the attacker to steal session data or perform unauthorized actions as a clinician.

Quick answers

Is CVE-2026-46518 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-46518 being exploited in the wild.
How severe is CVE-2026-46518?
High severity, with a CVSS score of 7.7, published 10 June 2026.
Which products and versions are affected?
OpenEMR OpenEMR < 8.0.0.1.
Is there a fix for CVE-2026-46518?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-46518 attacked?
It is attacked over the network, in a web application.
Am I affected by CVE-2026-46518?
Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A stored cross-site scripting (XSS) vulnerability exists in OpenEMR's prescription CSS/HTML multi-print feature due to missing output encoding in the multiprintcss_header() function within controllers/C_Prescription.class.php. An attacker with patient portal access can exploit this by making a direct PUT request to the 'api/patient/:num' endpoint, which bypasses the intended 'api/portalpatient' audit workflow and writes unvalidated HTML/JavaScript directly to the patient_data table. When a clinician views the affected patient's prescription in the multi-print view, the payload executes in their authenticated session. This allows the attacker to cross the patient-to-clinician trust boundary, potentially accessing CSRF tokens and session cookies. The issue is patched in version 8.0.0.1.

Affected products

  • OpenEMR OpenEMR < 8.0.0.1

Timeline

  • 2026-03-11: advisory: GitHub Security Advisory published
  • 2026-06-10: disclosed: NVD publication date

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.