Stored script execution via unencoded allergy title
Published Mar 22, 2021 · Updated Apr 30, 2025
Stored XSS in OpenEMR 2.7.3-rc1 through 6.0.0 allows remote authenticated users to run script in an administrator's browser. The Allergies display title reaches patient_report.php, where $disptitle is emitted into HTML without the text() output-encoding operation added by the patch. Exploitation requires low-privilege access and an administrator to enter the crafted allergy value; the script executes with that administrator's browser privileges.
Summary
What happened
Stored XSS in OpenEMR 2.7.3-rc1 through 6.0.0 allows remote authenticated users to run script in an administrator's browser. The Allergies display title reaches patient_report.php, where $disptitle is emitted into HTML without the text() output-encoding operation added by the patch. Exploitation requires low-privilege access and an administrator to enter the crafted allergy value; the script executes with that administrator's browser privileges.
The record
- CVE
- CVE-2021-25921
- Published
- Mar 22, 2021
- Updated
- Apr 30, 2025
- Vendor
- OpenEMR Foundation
- Product
- OpenEMR
- Classifications
- T1059.007
- Attack vector
- network
- Privileges
- authenticated
Timeline
How it unfolded
- Mar 22, 2021CVE publishedPublication date reported by the CVE source.
- Apr 30, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=2.7.3-rc1, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.9.0, 3.0.0, 3.0.1, 3.1.0, 3.2.0, 4.0.0, 4.1.0, 4.1.1, 4.1.2, 4.1.2.3, 4.1.2.6, 4.1.2.7, 4.2.0, 4.2.0.3, 4.2.1, 4.2.2, 5.0.0, 5.0.0.5, 5.0.0.6, 5.0.1, 5.0.1.1, 5.0.1.2, 5.0.1.3, 5.0.1.4, 5.0.1.5, 5.0.1.6, 5.0.1.7, 5.0.2, 5.0.2.1, 5.0.2.2, 5.0.2.3, 5.0.2.4, 6.0.0
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo