← Vulnerability feed

Vulnerability record · CVE-2021-25919 · published 22 March 2021

CVE-2021-25919: OpenEMR stored XSS via user creation input fields

Open Emr · Openemr

OpenEMR versions 5.0.2 through 6.0.0 fail to properly validate user input, allowing stored cross-site scripting when a highly privileged attacker creates a new user. Because the payload is persisted, it can execute in the browser of anyone who later views the affected record, making it a durable risk in a clinical application.

4.8 CVSS 3.1 Medium EPSS 70% · top 0.6% CWE-79 · Cross-site scripting
4.8CVSS 3.1 base score, v2 3.5
70%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
4References
17 Jun 2026Last modified by NVD

Description

In OpenEMR, versions 5.0.2 to 6.0.0 are vulnerable to Stored Cross-Site-Scripting (XSS) due to user input not being validated properly. A highly privileged attacker could inject arbitrary code into input fields when creating a new user.

CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 19 September 2026. Confidence: high.

medium priorityRequires high privileges and victim interaction, but the stored nature and very high EPSS score raise the practical risk.

What it is

OpenEMR versions 5.0.2 through 6.0.0 fail to properly validate user input, allowing stored cross-site scripting when a highly privileged attacker creates a new user. Because the payload is persisted, it can execute in the browser of anyone who later views the affected record, making it a durable risk in a clinical application.

Impact

An attacker with high privileges can inject arbitrary script that runs in the context of other users' sessions, potentially stealing session data or performing actions as the victim. The CVSS scope change indicates the impact can extend beyond the vulnerable component.

Attack surface

The flaw is reachable over the network through the user-creation input fields, but requires high privileges and user interaction from a victim who views the injected content. No authentication bypass is involved; the attacker must already hold an elevated account.

Exploitation

Not listed in CISA KEV and no public exploit references are tagged, but EPSS is 0.69893 (99.3rd percentile), indicating a high modeled likelihood of exploitation activity.

What to do

  • Apply the vendor patch referenced in the OpenEMR commit 0fadc3e592d84bc9dfe9e0403f8bd6e3c7d8427f.
  • Restrict and audit accounts with privileges to create users, enforcing least privilege.
  • Validate and encode all user-supplied input on user-creation forms and output contexts.
  • Deploy a content security policy and output encoding to reduce stored XSS execution.
  • Review existing user records for injected script content and remediate any found.

Detection

  • Search application and web logs for script tags or event-handler patterns in user-creation requests.
  • Monitor for anomalous user-creation activity, especially by accounts that rarely perform that action.
  • Inspect stored user profile fields for HTML or JavaScript content that should not be present.
  • Alert on browser-side or WAF signatures matching XSS payloads targeting OpenEMR user management endpoints.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2021-25919 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2026-24898Open-emr openemr improper authentication vulnerabilityOpenEMR is a free and open source electronic health records and medical practice management application. Prior to 8.0.0, an unauthenticated token dis…EPSS 0.56%9.8CVE-2024-22611Open-emr openemr sql injection vulnerabilityOpenEMR 7.0.2 is vulnerable to SQL Injection via \openemr\library\classes\Pharmacy.class.php, \controllers\C_Pharmacy.class.php and \openemr\controll…EPSS 6.3%9.8CVE-2024-37734Open-emr openemr vulnerabilityAn issue in OpenEMR 7.0.2 allows a remote attacker to escalate privileges viaa crafted POST request using the noteid parameter.EPSS 0.80%9.8CVE-2020-13567Open-emr openemr sql injection vulnerabilityMultiple SQL injection vulnerabilities exist in phpGACL 3.3.7. A specially crafted HTTP request can lead to a SQL injection. An attacker can send an …EPSS 2.3%9.8CVE-2019-17197Open-emr openemr sql injection vulnerabilityOpenEMR through 5.0.2 has SQL Injection in the Lifestyle demographic filter criteria in library/clinical_rules.php that affects library/patient.inc.EPSS 1.5%9.8CVE-2019-14529Open-emr openemr sql injection vulnerabilityOpenEMR before 5.0.2 allows SQL Injection in interface/forms/eye_mag/save.php.EPSS 28%9.8CVE-2018-17179Open-emr openemr sql injection vulnerabilityAn issue was discovered in OpenEMR before 5.0.1 Patch 7. There is SQL Injection in the make_task function in /interface/forms/eye_mag/php/taskman_fun…EPSS 13%9.8CVE-2018-17181Open-emr openemr sql injection vulnerabilityAn issue was discovered in OpenEMR before 5.0.1 Patch 7. SQL Injection exists in the SaveAudit function in /portal/lib/paylib.php and the portalAudit…EPSS 1.4%

Source: NIST National Vulnerability Database (record CVE-2021-25919), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.