CVE-2026-67612

OpenEMR 8.2.0 Stored XSS via import_template.php Template Management

Published Aug 3, 2026 CVSS 4.0 · 4.8 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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 available
History
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
Type Values Removed Values Added
First Time appeared Openemr
Openemr openemr
Vendors & Products Openemr
Openemr openemr
Type Values Removed Values Added
Metrics ssvc

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

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

Weaknesses
  • CWE-79

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

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Aug 14, 2026, 4:51 PM
Reserved
Jul 29, 2026, 9:07 PM
Status
Deferred
Published
Aug 3, 2026, 5:16 PM
Modified
Sep 9, 2026, 8:40 PM