CVE-2026-40507
Received Received - Intake

Reflected XSS in OpenEMR Patient Portal

Vulnerability report for CVE-2026-40507, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-19

Last updated on: 2026-08-19

Assigner: VulnCheck

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-19
Last Modified
2026-08-19
Generated
2026-08-19
AI Q&A
2026-08-19
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
openemr openemr to 8.3.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-40507 is a reflected cross-site scripting (XSS) vulnerability in OpenEMR versions prior to 8.3.0. It occurs in the patient portal template import handler where the templateHtml GET parameter is reflected into the page response without sanitization. An attacker can craft a URL with malicious JavaScript in this parameter, which executes when an authenticated user with Forms Administration permissions visits the link.

Detection Guidance

Check OpenEMR versions prior to 8.3.0 for the reflected XSS vulnerability in the patient portal template import handler. Inspect GET requests to /portal/import_template.php with the templateHtml parameter. Look for unsanitized user input reflected in responses. Use network monitoring tools to detect malicious URLs containing JavaScript payloads in the templateHtml parameter.

Impact Analysis

This vulnerability allows an attacker to execute arbitrary JavaScript in the browser of authenticated users with Forms Administration permissions. Successful exploitation could lead to session hijacking, enabling the attacker to take control of the user's session and potentially access sensitive data or perform unauthorized actions.

Compliance Impact

This vulnerability could lead to unauthorized access to patient data, violating HIPAA's security and privacy requirements. It may also result in data breaches, which are a significant concern under GDPR, potentially leading to fines and reputational damage.

Mitigation Strategies

Upgrade OpenEMR to version 8.3.0 or later immediately. Apply the patch from the OpenEMR release notes or the referenced commit. Remove or restrict access to the vulnerable /portal/import_template.php endpoint if possible. Implement input validation and output encoding for all user-supplied parameters. Monitor for suspicious activity involving the templateHtml parameter.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-40507. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart