Cross-site scripting in OpenEMR - CVE-2026-40508

 

Cross-site scripting in OpenEMR - CVE-2026-40508

Published: August 18, 2026 / Updated: September 14, 2026


Vulnerability identifier: #VU144029
CSH Severity: Low
CVSS v4: 5.1 [CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N]
CVE-ID: CVE-2026-40508
CWE-ID: CWE-79
Exploitation vector: Remote access
Exploit availability: No public exploit available

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.


Affected software

OpenEMR

How to mitigate CVE-2026-40508

Install security update from vendor's website.

OpenEMR - update to 8.3.0

External References

Related Security Bulletins