Skip to main content

CVE-2025-43860: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in openemr openemr

High
VulnerabilityCVE-2025-43860cvecve-2025-43860cwe-79
Published: Fri May 23 2025 (05/23/2025, 15:35:01 UTC)
Source: CVE
Vendor/Project: openemr
Product: openemr

Description

OpenEMR is a free and open source electronic health records and medical practice management application. A stored cross-site scripting (XSS) vulnerability in versions prior to 7.0.3.4 allows any authenticated user with patient creation and editing privileges to inject arbitrary JavaScript code into the system by entering malicious payloads in the (1) Text Box fields of Address, Address Line 2, Postal Code and City fields and (2) Drop Down menu options of Address Use, State and Country of the Additional Addresses section of the Contact tab in Patient Demographics. The injected script can execute in two scenarios: (1) dynamically during form input, and (2) when the form data is later loaded for editing. Version 7.0.3.4 contains a patch for the issue.

AI-Powered Analysis

AILast updated: 07/08/2025, 22:12:52 UTC

Technical Analysis

CVE-2025-43860 is a high-severity stored cross-site scripting (XSS) vulnerability affecting OpenEMR, an open-source electronic health records (EHR) and medical practice management system widely used in healthcare environments. This vulnerability exists in versions prior to 7.0.3.4 and allows any authenticated user with patient creation and editing privileges to inject arbitrary JavaScript code into the system. The injection points include multiple input fields within the Additional Addresses section of the Contact tab in Patient Demographics: specifically, the Text Box fields for Address, Address Line 2, Postal Code, and City, as well as the Drop Down menu options for Address Use, State, and Country. The malicious script can execute in two scenarios: dynamically during form input and when the form data is subsequently loaded for editing. This means that the injected payload can trigger immediately as the user interacts with the form or later when the data is revisited, increasing the risk of persistent exploitation. The vulnerability arises from improper neutralization of input during web page generation, classified under CWE-79. The CVSS v3.1 score is 7.6, reflecting a high severity due to network attack vector, low attack complexity, requiring privileges but with user interaction, and causing high confidentiality impact with limited integrity impact and no availability impact. The vulnerability has not been reported exploited in the wild yet. The vendor has addressed the issue in version 7.0.3.4 by patching the input validation and sanitization mechanisms. Given the nature of OpenEMR as a critical healthcare application managing sensitive patient data, exploitation of this XSS flaw could lead to session hijacking, theft of sensitive health information, unauthorized actions on behalf of users, and potential pivoting within the healthcare network.

Potential Impact

For European organizations, particularly healthcare providers using OpenEMR, this vulnerability poses significant risks. Exploitation could lead to unauthorized disclosure of sensitive patient health information, violating GDPR and other data protection regulations, resulting in legal and financial penalties. The ability to execute arbitrary JavaScript in the context of authenticated users could enable attackers to hijack user sessions, manipulate patient records, or implant further malware, undermining the integrity of medical data and trust in healthcare IT systems. Given the critical nature of healthcare services, any disruption or data breach could have severe consequences for patient safety and organizational reputation. Additionally, the persistent nature of stored XSS means that multiple users could be affected over time, amplifying the impact. The requirement for authenticated access limits exploitation to insiders or compromised accounts, but this is a realistic threat vector in healthcare environments where multiple staff members have editing privileges. The dynamic execution during form input and on data reload increases the attack surface and potential for unnoticed exploitation.

Mitigation Recommendations

European healthcare organizations using OpenEMR should urgently upgrade to version 7.0.3.4 or later to apply the official patch addressing this vulnerability. Until the upgrade is complete, implement strict access controls to limit patient creation and editing privileges only to trusted personnel, minimizing the number of users who can inject malicious payloads. Conduct thorough audits of user accounts and monitor for unusual activity indicative of exploitation attempts. Employ web application firewalls (WAFs) with custom rules to detect and block common XSS payload patterns targeting the vulnerable fields. Enhance input validation and output encoding at the application layer if possible, especially for the affected fields in patient demographics. Train staff on phishing and social engineering risks to reduce the chance of credential compromise. Regularly review and sanitize existing patient data entries to detect and remove any malicious scripts that may have been injected prior to patching. Finally, implement robust logging and alerting mechanisms to detect suspicious behavior related to patient record modifications.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2025-04-17T20:07:08.556Z
Cisa Enriched
false
Cvss Version
3.1
State
PUBLISHED

Threat ID: 683099ad0acd01a249274026

Added to database: 5/23/2025, 3:52:13 PM

Last enriched: 7/8/2025, 10:12:52 PM

Last updated: 8/7/2025, 10:35:42 AM

Views: 13

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats