Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAttacker obtains valid OpenEMR admin credentials
-
DeliveryNavigate to portal template management endpoint
-
ExploitSave template with injected JavaScript payload
-
InstallVictim user loads poisoned template in browser
-
C2Script reads unprotected document.cookie
-
ExecuteSession token exfiltrated to attacker-controlled server
-
ImpactAttacker replays token to hijack victim session
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the attacker to hold a valid, authenticated OpenEMR administrator account (PR:H per CVSS 4.0) - this is the primary limiting condition, restricting the attacker pool to insiders or accounts compromised through a separate initial access vector. The attacker must have write access to the patient portal template management feature specifically; if this feature is disabled or role-restricted below full admin, exploitation is blocked. A victim user (admin, clinician, or portal patient) must load or preview the poisoned template in their browser (UI:P), which is a routine application workflow rather than a contrived action. The cookie exfiltration path further requires that OpenEMR session cookies lack the HttpOnly attribute - described as a confirmed condition in this vulnerability, but independently verifiable in the target deployment. No special network position is required; the application must simply be network-accessible (AV:N). What limits exploitation: valid admin credentials required; victim must actively access the poisoned template; HttpOnly enforcement on cookies would block the specific session-theft chain described (though XSS payload execution would still occur). |
| Impact | The CVSS 4.0 score of 4.8 (AV:N/AC:L/AT:N/PR:H/UI:P/SC:L/SI:L) accurately captures the constrained attack surface: exploitation requires valid administrator credentials (PR:H) and passive victim interaction - a user must load the poisoned template (UI:P). These two requirements meaningfully limit opportunistic mass exploitation. However, the real-world impact in a healthcare context exceeds what the numeric score conveys: OpenEMR stores protected health information (PHI), and a hijacked clinician or administrator session provides unauthorized access to patient records, prescriptions, and billing data - a HIPAA-reportable breach. The PR:H prerequisite presupposes insider threat or a separately compromised admin account, both realistic in healthcare environments. No EPSS score was provided in the input data. Active exploitation is not confirmed in CISA KEV, but a public researcher writeup and VulnCheck-confirmed POC meaningfully lower exploitation effort for targeted attacks. The missing HttpOnly cookie attribute is a compounding misconfiguration that amplifies the XSS impact - without it, the cookie theft chain can be severed as a compensating control even if payload execution occurs. |
| Exploit ScenarioDerived | A malicious or compromised OpenEMR administrator navigates to the patient portal template editor, saves a template containing a JavaScript payload that reads document.cookie and transmits the value via an out-of-band HTTP request to an attacker-controlled server. Any clinician, admin, or portal patient who subsequently loads or previews the poisoned template executes the script silently in their browser, with their session token captured and replayed by the attacker to assume full authenticated access. A step-by-step public proof-of-concept is available at jivasecurity.com, making this technique accessible to non-specialist attackers against confirmed vulnerable instances. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 03, 2026
Stored cross-site scripting in OpenEMR's patient portal template system (through version 8.2.0) allows authenticated administrators to inject persistent JavaScript payloads that execute in the browsers of any admin, clinician, or portal patient who views a poisoned template. The combination of absent output encoding at the template retrieval endpoint and missing HttpOnly attributes on session cookies enables direct document.cookie exfiltration, resulting in full session hijacking of privileged healthcare accounts. No public exploit identified in CISA KEV, but a publicly available proof-of-concept and detailed researcher writeup (VulnCheck / jivasecurity.com) significantly lower the bar for exploitation in targeted scenarios.
RemediationAI
No vendor-released patch version has been confirmed in the available data - organizations should monitor the official OpenEMR release channel and GitHub repository for a fix and apply it immediately upon release. As compensating controls pending a patch: enforce HttpOnly and Secure flags on session cookies by setting session.cookie_httponly = 1 and session.cookie_secure = 1 in php.ini or OpenEMR's session configuration - this severs the cookie-exfiltration chain even if XSS payloads execute, though it does not eliminate the underlying injection. Deploy a Content Security Policy (CSP) response header that disallows inline script execution (script-src 'self') to further limit XSS impact, noting this may break legitimate OpenEMR UI functionality and requires testing. Restrict access to the template management endpoint to the smallest feasible set of trusted administrator accounts and review audit logs for unauthorized template modifications. Advisory references: https://www.vulncheck.com/advisories/openemr-stored-xss-via-import-template-php-template-management and https://jivasecurity.com/writeups/openemr-portal-template-stored-xss.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
OpenEMR is a widely used open-source electronic health records (EHR) and practice management application built on PHP, covering the full CPE range cpe:2.3:a:openemr:openemr:*:*:*:*:*:*:*:* through version 8.2.0. The vulnerable component is the patient portal template management system - the template save endpoint applies only a blocklist filter for literal PHP open tags (<?php), leaving HTML event handlers, <script> blocks, javascript: URI schemes, and similar injection vectors fully unblocked. CWE-79 (Improper Neutralization of Input During Web Page Generation) identifies the root cause: attacker-controlled template content is stored to the database and later rendered to victim browsers without output encoding or contextual escaping. The compounding weakness is the absence of the HttpOnly attribute on OpenEMR session cookies, which allows JavaScript executing in the page context to read document.cookie directly, converting a stored XSS into a reliable session-hijacking primitive against high-value healthcare accounts.
Know when Openemr gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
PR:H for required admin credentials; S:C because stored XSS impacts users beyond the injecting admin's own session; no availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
An authenticated SQL injection vulnerability exists in OpenEMR ≤ 4.1.1 Patch 14 that allows a low-privileged attacker to
Unauthenticated token disclosure in OpenEMR before 8.0.0. CVSS 10.0. PoC and patch available.
Path traversal in OpenEMR 7.0.4 disposeDocument() allows file access. PoC available.
Path traversal in OpenEMR electronic health records before fix allows authenticated users to read arbitrary files on the
SQL injection in OpenEMR electronic health records before fix. Authenticated users can execute arbitrary SQL through the
OpenEMR 7.0.2 is vulnerable to SQL Injection via \openemr\library\classes\Pharmacy.class.php, \controllers\C_Pharmacy.cl
An issue in OpenEMR 7.0.2 allows a remote attacker to escalate privileges viaa crafted POST request using the noteid par
Information disclosure in OpenEMR 5.0.2 to before 8.0.0 exposes sensitive data. PoC and patch available.
Remote code execution in OpenEMR through 8.2.0 lets an authenticated administrator poison the document category tree so
interface/fax/fax_dispatch.php in OpenEMR 4.1.0 allows remote authenticated users to execute arbitrary commands via shel
interface/globals.php in OpenEMR 2.x, 3.x, and 4.x before 4.2.0 patch 2 allows remote attackers to bypass authentication
Authentication bypass vulnerability in portal/account/register.php in versions of OpenEMR before 5.0.1.4 allows a remote
EUVD-2026-52349
GHSA-rv29-9mq6-7j5q
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB