Cross-site scripting in OpenEMR - CVE-2026-40508
Published: August 18, 2026 / Updated: September 14, 2026
Vulnerability details
The vulnerability allows a remote user to execute arbitrary script code in another user's browser.
The vulnerability exists due to cross-site scripting in /portal/import_template.php and DocumentTemplateService when uploading a template file and later rendering it in the HTML editor. A remote user can upload a template file containing arbitrary HTML or JavaScript to execute arbitrary script code in another user's browser.
User interaction is required when another Forms Administration user opens the uploaded template in the HTML editor, and event handler attributes can bypass the existing <script> tag check.