CVE-2026-67612 Details
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.
A stored cross-site scripting vulnerability has been identified in OpenEMR versions through 8.2.0, within the patient portal template system. This vulnerability allows authenticated administrators to inject arbitrary HTML and JavaScript. The issue arises because the template save mode only filters literal PHP open tags, enabling the storage of malicious payloads. Exploitation is possible due to the absence of output encoding at the template retrieval endpoint, coupled with missing HttpOnly cookie attributes. This combination allows for the exfiltration of session tokens via document.cookie access, leading to full session hijacking of any admin, clinician, or portal patient who views the compromised template.
Set the OpenEMR session cookie to HttpOnly, ensuring it cannot be accessed via JavaScript. Additionally, implement output encoding in the template retrieval process and sanitize template content on save using a proper HTML sanitizer. Finally, add ownership verification to the template retrieval process to prevent unauthorized access to poisoned templates.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Aug 3, 2026CISA-ADP
Assessed Aug 3, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://jivasecurity.com/writeups/openemr-portal-template-stored-xss | [email protected] | ExploitTechnical Analysis |
| https://www.vulncheck.com/advisories/openemr-stored-xss-via-import-template-php-template-management | [email protected] | Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| OpenEMR | <= 8.2.0 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 3, 2026 | New CVE Received | [email protected] |
| Aug 3, 2026 | CVE Modified | CISA-ADP |
Volerion