Browser script execution via unescaped patient-match key
Published Mar 22, 2021 · Updated Aug 3, 2024
Reflected XSS in OpenEMR 4.2.0 through 6.0.0 allows remote attackers to execute script in a user's browser via a malicious URL. The patient_match_dialog.php endpoint embeds the key query parameter in JavaScript after addslashes(), which does not stop String.fromCharCode() payloads. Exploitation requires a victim to open the crafted URL; successful script runs in that user's OpenEMR browser context.
Summary
What happened
Reflected XSS in OpenEMR 4.2.0 through 6.0.0 allows remote attackers to execute script in a user's browser via a malicious URL. The patient_match_dialog.php endpoint embeds the key query parameter in JavaScript after addslashes(), which does not stop String.fromCharCode() payloads. Exploitation requires a victim to open the crafted URL; successful script runs in that user's OpenEMR browser context.
The record
- CVE
- CVE-2021-25922
- Published
- Mar 22, 2021
- Updated
- Aug 3, 2024
- Vendor
- OpenEMR Foundation
- Product
- OpenEMR
- Classifications
- CWE-79, T1204.001
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Mar 22, 2021CVE publishedPublication date reported by the CVE source.
- Aug 3, 2024Record 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=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?
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