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.
Published: 2026-08-19
Score: 5.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability resides in OpenEMR’s patient portal template import handler where the GET parameter named templateHtml is reflected directly into the page output without any form of sanitization. The resulting reflected cross‑site scripting can execute arbitrary JavaScript in the context of the user’s browser. If an attacker injects a malicious payload into that parameter, any authenticated user with Forms Administration permissions who opens the crafted URL will have their session hijacked and potentially be able to perform arbitrary actions on behalf of that user.

Affected Systems

OpenEMR products supplied by openemr:openemr are affected for all releases earlier than version 8.3.0. No specific sub‑versions are listed, so any deployment of OpenEMR before 8.3.0 that exposes the patient‑portal template import interface is vulnerable.

Risk and Exploitability

The CVSS score of 5.1 indicates a medium severity impact. EPSS score of 0.00243 indicates a very low likelihood of exploitation, and the vulnerability is not yet listed in CISA’s KEV catalog. The attack requires an authenticated user with Forms Administration rights to visit the malicious link, which narrows the exposure to a subset of users but still poses a significant risk to the integrity of those accounts. The vulnerability can be exploited by simply crafting a URL containing a malicious value for the templateHtml parameter and convincing or tricking the target user to open it.

Generated by OpenCVE AI on August 20, 2026 at 15:52 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade OpenEMR to version 8.3.0 or later to eliminate the vulnerable code path.
  • Reduce the number of users granted Forms Administration permissions to limit the potential victim pool.
  • Implement or strengthen HTTP Content‑Security‑Policy headers to mitigate any remaining cross‑site scripting opportunities.

Generated by OpenCVE AI on August 20, 2026 at 15:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 25 Aug 2026 02:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 19 Aug 2026 18:30:00 +0000

Type Values Removed Values Added
First Time appeared Openemr
Openemr openemr
Vendors & Products Openemr
Openemr openemr

Wed, 19 Aug 2026 15:00:00 +0000

Type Values Removed Values Added
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.
Title OpenEMR < 8.3.0 Reflected XSS via templateHtml Parameter in Patient Portal
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

cvssV4_0

{'score': 5.1, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-25T02:06:25.652Z

Reserved: 2026-04-13T20:29:02.808Z

Link: CVE-2026-40507

cve-icon Vulnrichment

Updated: 2026-08-25T02:06:21.523Z

cve-icon NVD

Status : Received

Published: 2026-08-19T15:17:01.530

Modified: 2026-08-25T03:16:54.853

Link: CVE-2026-40507

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-20T16:00:05Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')