5.4Medium
CVE-2026-40508
OpenEMR before 8.3.0 contains a stored cross-site scripting vulnerability in the patient portal template import handler that allows authenticated attackers with Forms Administration permissions to upload template files containing arbitrary HTML or JavaScript. Attackers can inject malicious scripts through the template upload functionality, which are stored without sanitization and execute in the browser of any other Forms Administration user who views the template in the HTML editor.
What this means for your business
- An attacker can use it remotely, over a network, with an ordinary user login, but only after tricking someone into an action such as opening a file or a link.
- FIRST's prediction model gives it a 0.2% chance of attack attempts being seen in the next 30 days, ranking above 11% of all known flaws.
What to do
- 1Ask your IT team or provider whether any of your systems use the affected product.
- 2If you do, follow the vendor's guidance. No patch reference has been published yet.
Not sure if your company is exposed?
Fastnexa’s certified penetration testers can check whether attackers could use this flaw, or others like it, against your websites, apps and network. The full test is free for our first 10 founding clients until 31 December 2026.
Scoring
- CVSS
- 5.4 (v3.1)
- Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N- CVSS v4
- 5.1
- Weakness
- CWE-79
- Assigned by
- disclosure@vulncheck.com
Dates
- Published
- 2026-08-19
- Last modified
- 2026-09-09
- Sources
- NVD
References
- https://github.com/openemr/openemr/commit/ba316dd1d8de1291102da3f20f64240729ff899e
- https://github.com/openemr/openemr/releases/tag/v8_3_0
- https://github.com/openemr/openemr/security/advisories/GHSA-5293-8q47-cf44
- https://www.vulncheck.com/advisories/openemr-stored-xss-via-patient-portal-template-import-handler
- https://github.com/openemr/openemr/security/advisories/GHSA-5293-8q47-cf44