---
id: CVE-2026-40507
title: >-
  OpenEMR before 8.3.0 contains a reflected cross-site scripting vulnerability
  in the patient portal template import handler
summary: >-
  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 …
severity: medium
cvss: 6.1
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'
cwe:
  - CWE-79
published: '2026-08-19'
updated: '2026-09-09'
sourceUpdated: '2026-09-09T20:40:01.933'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-40507'
references:
  - url: >-
      https://github.com/openemr/openemr/commit/ba316dd1d8de1291102da3f20f64240729ff899e
    label: disclosure@vulncheck.com
  - url: 'https://github.com/openemr/openemr/releases/tag/v8_3_0'
    label: disclosure@vulncheck.com
  - url: 'https://github.com/openemr/openemr/security/advisories/GHSA-rmmr-8498-463g'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/openemr-reflected-xss-via-templatehtml-parameter-in-patient-portal
    label: disclosure@vulncheck.com
  - url: 'https://github.com/openemr/openemr/security/advisories/GHSA-rmmr-8498-463g'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
epss: 0.00338
epssPercentile: 0.24425
ingestedAt: '2026-09-09T21:22:45.539Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
