CVE-2026-40507: OpenEMR < 8.3.0 Reflected XSS via templateHtml Parameter in Patient Portal

Published Aug 19, 2026
·
Updated

OpenEMR before 8.3.0 contains a reflected cross-site scripting vulnerability in the patient portal template import handler. The templateHtml GET parameter is reflected into the page response without sanitization. An attacker can craft a URL that executes arbitrary JavaScript in the browser of any authenticated user with Forms Administration permissions who visits the link, enabling session hijacking.

Affected Software

1 affected component
OpenEMR OpenEMR<8.3.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade OpenEMR to a version that resolves this vulnerability.

    Fixed in 8.3.0
  2. Compensating control

    Block or do not allow the patient portal template import handler requests that include the templateHtml GET parameter until OpenEMR is upgraded to 8.3.0 or later.

Event History

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

Frequently Asked Questions

1

Who can be targeted by this issue?

An attacker can target authenticated OpenEMR users who have Forms Administration permissions. Exploitation requires persuading such a user to visit a crafted URL.

2

Does exploitation require the attacker to authenticate or have administrative permissions?

No attacker authentication or privileges are required. The attacker needs to craft a URL containing malicious content in the templateHtml GET parameter and induce a Forms Administration user to open it.

3

What is the impact if exploitation succeeds?

The crafted script executes in the targeted user's browser. This can enable session hijacking and affect the confidentiality and integrity of actions available through that user's session.

4

Which versions are affected?

OpenEMR versions before 8.3.0 are affected. Version 8.3.0 is identified as the release containing the fix.

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