CVE-2026-40508: OpenEMR < 8.3.0 Stored XSS via Patient Portal Template Import Handler

Published Aug 19, 2026
·
Updated

OpenEMR before 8.3.0 contains a stored cross-site scripting vulnerability in the patient portal template import handler that allows authenticated attackers with Forms Administration permissions to upload template files containing arbitrary HTML or JavaScript. Attackers can inject malicious scripts through the template upload functionality, which are stored without sanitization and execute in the browser of any other Forms Administration user who views the template in the HTML editor.

Affected Software

1 affected component
OpenEMR OpenEMR<8.3.0

Event History

Aug 19, 2026
CVE Published
via MITRE·02:51 PM
Data Sourced
via MITRE·02:51 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

OpenEMR deployments before 8.3.0 are affected where users have Forms Administration permissions and use the patient portal template import and HTML editor functionality. The stored payload executes when another Forms Administration user views the affected template in the HTML editor.

2

What does an attacker need to exploit it?

An attacker needs an authenticated OpenEMR account with Forms Administration permissions. They must also be able to upload a patient portal template containing malicious HTML or JavaScript; a target Forms Administration user must then view that template in the HTML editor.

3

Are users without Forms Administration permissions directly targeted by the described trigger?

The described execution path affects Forms Administration users viewing the template in the HTML editor. The provided information does not identify execution in browsers of other user roles.

4

What can be done if upgrading is not immediately possible?

Restrict Forms Administration permissions and prevent untrusted users from uploading patient portal template files. Review imported templates for arbitrary HTML or JavaScript before Forms Administration users open them in the HTML editor.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203