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: n/a
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 information is unavailable and the vulnerability is not yet listed in CISA’s KEV catalog, which suggests a moderate likelihood of exploitation in the wild. 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 19, 2026 at 17:27 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 19, 2026 at 17:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-19T14:48:49.751Z

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

Link: CVE-2026-40507

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

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

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

Link: CVE-2026-40507

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-19T17:30:16Z

Weaknesses
  • CWE-79

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