OpenEMR before 8.3.0 contains a reflected cross-site scripting vulnerability in the patient portal template import handler. (CVE-2026-40507)
OpenEMR versions before 8.3.0 contain a reflected cross-site scripting (XSS) vulnerability in the patient portal template import handler. The vulnerability arises because the templateHtml GET parameter is reflected in the page response without proper sanitization. An attacker can craft a malicious URL that executes arbitrary JavaScript in the browser of any authenticated user with Forms Administration permissions who clicks the link, potentially enabling session hijacking.
AI Analysis
Technical Summary
The vulnerability in OpenEMR prior to version 8.3.0 is a reflected cross-site scripting (CWE-79) flaw located in the patient portal template import handler. Specifically, the templateHtml GET parameter is not sanitized before being reflected in the HTTP response. This allows an attacker to inject and execute arbitrary JavaScript code in the context of an authenticated user with Forms Administration privileges. The CVSS 3.1 base score is 6.1 (medium severity), with network attack vector, low attack complexity, no privileges required but user interaction needed, and impacts confidentiality and integrity with no availability impact. There are no known exploits in the wild and no patch links provided in the data.
Potential Impact
Successful exploitation allows execution of arbitrary JavaScript in the browser of an authenticated user with Forms Administration permissions, which can lead to session hijacking and unauthorized actions within the application. The impact is limited to confidentiality and integrity of the affected user's session and data. There is no indication of availability impact or broader system compromise.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no official patch or fix is referenced in the provided data, users should monitor the vendor's security advisories for updates. In the meantime, avoid clicking suspicious links and restrict Forms Administration permissions to trusted users only.
OpenEMR before 8.3.0 contains a reflected cross-site scripting vulnerability in the patient portal template import handler. (CVE-2026-40507)
Description
OpenEMR versions before 8.3.0 contain a reflected cross-site scripting (XSS) vulnerability in the patient portal template import handler. The vulnerability arises because the templateHtml GET parameter is reflected in the page response without proper sanitization. An attacker can craft a malicious URL that executes arbitrary JavaScript in the browser of any authenticated user with Forms Administration permissions who clicks the link, potentially enabling session hijacking.
CVSS v3.1
Score 6.1medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in OpenEMR prior to version 8.3.0 is a reflected cross-site scripting (CWE-79) flaw located in the patient portal template import handler. Specifically, the templateHtml GET parameter is not sanitized before being reflected in the HTTP response. This allows an attacker to inject and execute arbitrary JavaScript code in the context of an authenticated user with Forms Administration privileges. The CVSS 3.1 base score is 6.1 (medium severity), with network attack vector, low attack complexity, no privileges required but user interaction needed, and impacts confidentiality and integrity with no availability impact. There are no known exploits in the wild and no patch links provided in the data.
Potential Impact
Successful exploitation allows execution of arbitrary JavaScript in the browser of an authenticated user with Forms Administration permissions, which can lead to session hijacking and unauthorized actions within the application. The impact is limited to confidentiality and integrity of the affected user's session and data. There is no indication of availability impact or broader system compromise.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no official patch or fix is referenced in the provided data, users should monitor the vendor's security advisories for updates. In the meantime, avoid clicking suspicious links and restrict Forms Administration permissions to trusted users only.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-pqfg-4hrq-q9jm
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-40507"]
- Ecosystems
- []
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a85ee14acd9273b4969a276
Added to database: 08/19/2026, 17:55:32 UTC
Last enriched: 08/19/2026, 18:25:21 UTC
Last updated: 08/19/2026, 18:52:10 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.