Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as portal patient
-
DeliveryInject javascript: URL into document template_data
-
ExploitStaff opens submitted document for review
-
ExecutionScript runs in staff OpenEMR session
-
ImpactExfiltrate PHI/CSRF tokens and invoke admin endpoints
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 | Requires an authenticated patient portal account (PR:L) able to call /portal/patient/api/onsitedocument Create/Update. The targeted document template (filePath) must contain an {EncounterForm:...} or {Questionnaire:...} directive - the default 'Medical History' template qualifies - because only those directives write the patient-controlled encounterForm value into the iframe src. Exploitation fires only when a staff member opens the patient's document in the Portal Dashboard review page (UI:P, passive interaction), where jQuery .html() inserts the rendered markup; the iframe has no sandbox attribute and the page sends no Content-Security-Policy, so nothing blocks the javascript: scheme. Limiting factors: portal authentication is needed, a staff/admin victim must review the document, and admin-level reach depends on the reviewer being an administrator. |
| Impact | Signals converge on a credible, prioritize-this-week issue rather than an inflated high-CVSS score. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:P, VC:H/VI:H) scores 8.5 and reflects the real mechanism: a network-reachable, low-privilege (patient portal) account stores a javascript: payload that executes when staff passively review the document, yielding high confidentiality and integrity impact (PHI read, acting as the staff/admin user). The vuln.today Decision label is 'this_week', consistent with a serious but not emergency rating. There is NO CISA KEV listing and NO EPSS score in the provided data, so exploitation is 'no public exploit identified' as a packaged tool - however the GHSA advisory publishes concrete PoC steps, so defenders should not treat this as merely theoretical. The main things tempering raw severity are the dependencies on a valid portal account, a template containing the vulnerable {EncounterForm:}/{Questionnaire:} directive, and a staff member actually opening the submitted document (UI:P). Missing/conflicting data to note: EPSS and KEV are absent (cannot gauge wild exploitation probability), and the patient-to-staff scope crossing is modeled as subsequent-system-N in the input 4.0 vector even though the script runs under a different user's authority - a scope nuance worth flagging. |
| Exploit ScenarioDerived | A registered patient portal user submits or updates an onsite document whose template_data sets the encounterForm value to a javascript: URL (e.g. one that POSTs document.cookie or PHI to an attacker server). When a clinician or administrator opens that patient's document in the Portal Dashboard review page, DocumentTemplateRender renders the value unsanitized into an un-sandboxed <iframe src>, and with no CSP the script executes in the staff OpenEMR session. A detailed PoC exists in the GHSA advisory; it is not verified as packaged working exploit code. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 13, 2026
Stored cross-site scripting in OpenEMR before 8.5.0 lets an authenticated patient portal user place a javascript: URL in document template_data and have it execute in a staff member's browser when that staff member reviews the submitted document in the Portal Dashboard. The script runs in the OpenEMR origin with the reviewer's session and can read PHI and CSRF tokens and call staff or administrator endpoints, but exploitation requires a portal account, a template containing an {EncounterForm:...} or {Questionnaire:...} directive, and a staff victim opening the document; the advisory includes a public PoC reference that is not verified as working exploit code, and no CISA KEV status is supplied. The supplied decision label is this_week, consistent with a credible, prioritize-this-week issue rather than an inflated high-CVSS score.
RemediationAI
Vendor-released patch: OpenEMR 8.5.0. Upgrade any OpenEMR deployment before 8.5.0 to 8.5.0; the advisory's code-level fix builds the iframe URL on the server from the directive form name and an integer form ID instead of reading a URL from template_data, and, if a stored URL is required, accepts only relative paths under /interface/forms/. See the vendor advisory at https://github.com/openemr/openemr/security/advisories/GHSA-hfpq-j3fj-cpmv and the VulnCheck advisory at https://www.vulncheck.com/advisories/openemr-before-8.5.0-stored-xss-via-document-template-rendering. The supplied data does not describe a validated workaround, so deploying 8.5.0 is the complete remediation identified by the advisory.
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 stores patient document template data in the onsite_documents.template_data column. DocumentTemplateRender::doRender() handles directives such as {EncounterForm:...} and {Questionnaire:...} and, for those directives, writes the patient-controlled encounterForm value into an iframe src using attr(), which escapes HTML characters but does not restrict the URL scheme. A javascript: URL therefore passes, and because the iframe has no sandbox attribute while the page sends no Content-Security-Policy, the script executes in the OpenEMR origin when a staff user reviews the document. The staff review page inserts the rendered markup with jQuery .html(), and a portal patient can control template_data through OnsiteDocumentController::Create at portal/patient/libs/Controller/OnsiteDocumentController.php:296 and Update at :409. The flaw is CWE-79 improper neutralization of input during web page generation, with CPE cpe:2.3:a:openemr:openemr:*:*:*:*:*:*:*:* covering affected OpenEMR versions before 8.5.0. The independent assessment confirms that the patient must use a template containing the relevant directive and that a staff or administrator must open it; administrator-level reach depends on the reviewer being an administrator.
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:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Network-reachable via portal auth (PR:L), staff must open the document (UI:R), script executes under the staff security authority (S:C) exposing PHI (C:H) and enabling staff/admin actions (I:H); no availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
OpenEMR before 8.5.0 contains a stored cross-site scripting vulnerability that allows portal patients to run JavaScript in staff sessions by injecting javascript: URLs into document template_data. Attackers can submit an encounterForm value rendered unsanitized into an iframe src by DocumentTemplateRender, letting the script read PHI and CSRF tokens and call staff or admin endpoints.
Technical POC Analysis
CWE-79 (improper neutralization of input during web page generation), stored variant, in OpenEMR's document template renderer.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
OpenEMR versions before 8.5.0 contain a stored cross-site scripting vulnerability that allows an authenticated patient portal user to inject malicious JavaScript into document templates, which then executes in a staff member's browser when the document is reviewed. This could enable unauthorized access to protected health information (PHI) and compromise staff sessions, posing a significant risk to patient data confidentiality and regulatory compliance. Leadership should prioritize remediation this week to prevent potential data breaches and maintain trust.
Apply vendor patch.
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.
Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.
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
Authenticated low-privilege users can exploit OpenEMR before 8.3.0 to read and write arbitrary files through the fax/sms
interface/globals.php in OpenEMR 2.x, 3.x, and 4.x before 4.2.0 patch 2 allows remote attackers to bypass authentication
EUVD-2026-124977
GHSA-qr5x-5h36-j49x
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB