{"id":"CVE-2026-40507","summary":"OpenEMR \u003c 8.3.0 Reflected XSS via templateHtml Parameter in Patient Portal","details":"OpenEMR before 8.3.0 contains a reflected cross-site scripting vulnerability in the patient portal template import handler. The templateHtml GET parameter is reflected into the page response without sanitization. An attacker can craft a URL that executes arbitrary JavaScript in the browser of any authenticated user with Forms Administration permissions who visits the link, enabling session hijacking.","aliases":["GHSA-rmmr-8498-463g"],"modified":"2026-09-11T03:30:18.145511090Z","published":"2026-08-19T14:48:49.751Z","database_specific":{"cna_assigner":"VulnCheck","cwe_ids":["CWE-79"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40507.json"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40507.json"},{"type":"ADVISORY","url":"https://github.com/openemr/openemr/releases/tag/v8_3_0"},{"type":"ADVISORY","url":"https://github.com/openemr/openemr/security/advisories/GHSA-rmmr-8498-463g"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40507"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/openemr-reflected-xss-via-templatehtml-parameter-in-patient-portal"},{"type":"FIX","url":"https://github.com/openemr/openemr/commit/ba316dd1d8de1291102da3f20f64240729ff899e"},{"type":"PACKAGE","url":"https://github.com/openemr/openemr"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/openemr/openemr","events":[{"introduced":"0"},{"fixed":"ebb62eb3036a726314ab3e1c3e9263a41608b17b"},{"fixed":"ba316dd1d8de1291102da3f20f64240729ff899e"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"fixed":"8.3.0"}],"source":["DESCRIPTION","REFERENCES"]}}],"versions":["v3_0_1","v3_0_0","v2_9_0","v2_8_3","v2_8_2","v2_8_1","v2_8_0","v2_7_3-rc1","v2_7_2","v2_7_2-rc2","v2_7_2-rc1"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40507.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"}]}