Description
OpenEMR through 8.2.0 contains a stored cross-site scripting vulnerability in the patient portal template system that allows authenticated administrators to inject arbitrary HTML and JavaScript by storing malicious payloads through the template save mode, which only filters literal PHP open tags. Attackers can exploit the lack of output encoding at the template retrieval endpoint combined with missing HttpOnly cookie attributes to exfiltrate session tokens via document.cookie access, enabling full session hijacking of any admin, clinician, or portal patient who views a poisoned template.
Published: 2026-08-03
Score: 4.8 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

OpenEMR versions up to and including 8.2.0 implement a patient portal template system that sanitizes only literal PHP open tags but fails to encode output. During template creation, authenticated administrators can embed arbitrary HTML and JavaScript, because the system stores the payload without additional filtering. When a user accesses the affected template, the browser renders the malicious content, giving the attacker the ability to read the document.cookie store and hijack active sessions of any portal user, including administrators, clinicians, and patients.

Affected Systems

The vulnerability affects the openemr product from the OpenEMR vendor; all instances running OpenEMR 8.2.0 or earlier are vulnerable. No later releases are mentioned as affected.

Risk and Exploitability

The CVSS base score of 4.8 classifies the flaw as moderate severity. The EPSS score is unavailable, and the vulnerability is not listed in the KEV catalog, indicating no publicly confirmed exploitation yet. Nevertheless, exploitation requires an authenticated administrator to inject the payload, but once injected the malicious template can be viewed by any portal user, resulting in persistent session hijacking across users, making the risk significant enough to warrant prompt remediation.

Generated by OpenCVE AI on August 4, 2026 at 21:01 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade OpenEMR to a patched version
  • If an upgrade cannot be performed immediately, disable or remove the ability to edit or upload templates for non-privileged users, and enforce strict input validation for template content.
  • Configure the web application to set the HttpOnly flag on session cookies and implement output encoding for all dynamic template content.

Generated by OpenCVE AI on August 4, 2026 at 21:01 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 14 Aug 2026 17:15:00 +0000

Type Values Removed Values Added
First Time appeared Open-emr
Open-emr openemr
CPEs cpe:2.3:a:open-emr:openemr:*:*:*:*:*:*:*:*
Vendors & Products Open-emr
Open-emr openemr

Mon, 03 Aug 2026 17:45:00 +0000

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

Mon, 03 Aug 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Mon, 03 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Description OpenEMR through 8.2.0 contains a stored cross-site scripting vulnerability in the patient portal template system that allows authenticated administrators to inject arbitrary HTML and JavaScript by storing malicious payloads through the template save mode, which only filters literal PHP open tags. Attackers can exploit the lack of output encoding at the template retrieval endpoint combined with missing HttpOnly cookie attributes to exfiltrate session tokens via document.cookie access, enabling full session hijacking of any admin, clinician, or portal patient who views a poisoned template.
Title OpenEMR 8.2.0 Stored XSS via import_template.php Template Management
Weaknesses CWE-79
References
Metrics cvssV3_1

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

cvssV4_0

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


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-14T16:51:01.229Z

Reserved: 2026-07-29T21:07:39.203Z

Link: CVE-2026-67612

cve-icon Vulnrichment

Updated: 2026-08-03T16:35:09.016Z

cve-icon NVD

Status : Received

Published: 2026-08-03T17:16:44.037

Modified: 2026-08-03T17:16:44.037

Link: CVE-2026-67612

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-04T21:15:03Z

Weaknesses
  • CWE-79

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