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.
{
"cna_assigner": "VulnCheck",
"cwe_ids": [
"CWE-79"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40507.json"
}{
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "8.3.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
},
{
"original_tag": "v8_3_0",
"range": [
{
"fixed": "ebb62eb3036a726314ab3e1c3e9263a41608b17b"
}
],
"source": "REFERENCES_TAG"
},
{
"range": [
{
"fixed": "ba316dd1d8de1291102da3f20f64240729ff899e"
}
],
"source": "REFERENCES_COMMIT"
}
]
}