# CVE-2026-40508: OpenEMR < 8.3.0 Stored XSS via Patient Portal Template Import Handler

- Severity: Medium 5.1 (CVSS:4.0, scored by VulnCheck) `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-08-19T14:51:01.748Z
- Modified: 2026-10-27T13:10:00.360Z
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: VulnCheck

## Description

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.

(As written by CVE List.)

## Affected

- openemr openemr: before 8.3.0

## Every score

- VulnCheck: CVSS:4.0 5.1 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`
- VulnCheck: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/openemr/openemr/security/advisories/GHSA-5293-8q47-cf44> (exploit, vendor-advisory)
- <https://github.com/openemr/openemr/releases/tag/v8_3_0> (release-notes)
- <https://github.com/openemr/openemr/commit/ba316dd1d8de1291102da3f20f64240729ff899e> (patch)
- <https://www.vulncheck.com/advisories/openemr-stored-xss-via-patient-portal-template-import-handler> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-40508](https://www.cve.org/CVERecord?id=CVE-2026-40508), CVE Terms of Use, modified 2026-10-01
- NVD: [CVE-2026-40508](https://nvd.nist.gov/vuln/detail/CVE-2026-40508), Public domain, modified 2026-10-27

---

Page: https://cve.day/CVE-2026-40508 · Whole record: https://cve.day/CVE-2026-40508.json · Rebuilt by cve.day 2026-11-25T22:59:33.953Z
