{"id":"CVE-2026-126451","kind":"vulnerability","aliases":["CVE-2026-126451"],"related":[],"title":"OpenEMR: stored XSS lets portal patients run script in staff sessions","description":"OpenEMR before 8.5.0 contains a stored cross-site scripting vulnerability that allows portal patients to run JavaScript in staff sessions by injecting javascript: URLs into document template_data. Attackers can submit an encounterForm value rendered unsanitized into an iframe src by DocumentTemplateRender, letting the script read PHI and CSRF tokens and call staff or admin endpoints.","summary":"OpenEMR before 8.5.0 lets a patient using the patient portal store javascript: URLs in document template data that are later rendered unsanitized into an iframe. The script runs in a staff member's session, can read protected health information and CSRF tokens, and call staff or admin endpoints.","severity":"high","cvss":8.5,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["healthcare","openemr","other","patient-portal","self-hosted"],"not_affected_if":["openemr-8.5.0-or-later","patient-portal-disabled"],"how_to_check":"- Check the OpenEMR version in the installed application, for example in the admin footer or `version.php` in the web root.\n- Confirm whether the patient portal is enabled and reachable by patients.","fix":"- OpenEMR versions before `8.5.0` are affected; move to `8.5.0` or later.","status":"open","published_at":"2026-11-13T10:17:52+00:00","first_seen_at":"2026-11-13T10:47:23+00:00","triaged_at":"2026-11-13T10:50:57+00:00","updated_at":"2026-11-13T10:50:57+00:00","category":"other","confidence":0.7,"triage":{"at":"2026-11-13T10:50:57Z","model":"claude-haiku-5-5","output":{"fix":"- OpenEMR versions before `8.5.0` are affected; move to `8.5.0` or later.","reach":"internet","title":"OpenEMR: stored XSS lets portal patients run script in staff sessions","impact":"high","summary":"OpenEMR before 8.5.0 lets a patient using the patient portal store javascript: URLs in document template data that are later rendered unsanitized into an iframe. The script runs in a staff member's session, can read protected health information and CSRF tokens, and call staff or admin endpoints.","audience":"businesses","category":"other","nicknames":[],"who_cares":["openemr","healthcare","self-hosted","patient-portal"],"confidence":0.7,"fix_status":"available","needs_auth":"yes","worst_case":"script runs in staff sessions, reads PHI and CSRF tokens","analyst_note":"","how_to_check":"- Check the OpenEMR version in the installed application, for example in the admin footer or `version.php` in the web root.\n- Confirm whether the patient portal is enabled and reachable by patients.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["openemr-8.5.0-or-later","patient-portal-disabled"],"who_is_affected":"Clinics and organizations running OpenEMR before 8.5.0 with the patient portal enabled. The flaw needs a patient portal account, so installations without the portal are less exposed. Staff who open the affected document templates are the ones whose sessions can be abused.","user_interaction":"yes","product_ecosystem":"","needs_special_setup":"unknown","severity_if_unknown":"high"},"cost_usd":0.000737,"input_tokens":4631,"output_tokens":547,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-126451':14A,17A '-2026':13A,16A '8.5.0':29B,77C 'admin':73B,130C 'allow':87C 'attack':104C 'call':70B,127C 'contain':78C 'cross':82C 'cross-sit':81C 'csrf':67B,124C 'cve':12A,15A 'data':43B,103C 'document':41B,101C 'documenttemplaterend':117C 'encounterform':108C 'endpoint':74B,131C 'health':64B 'healthcar':18B 'host':26B 'ifram':51B,114C 'inform':65B 'inject':97C 'javascript':38B,92C,98C 'later':46B 'let':4A,30B,118C 'member':58B 'openemr':1A,19B,27B,75C 'patient':6A,22B,32B,35B,89C 'patient-port':21B 'phi':122C 'portal':5A,23B,36B,88C 'protect':63B 'read':62B,121C 'render':47B,110C 'run':7A,54B,91C 'script':8A,53B,84C,120C 'self':25B 'self-host':24B 'session':11A,60B,95C 'site':83C 'src':115C 'staff':10A,57B,71B,94C,128C 'store':2A,37B,80C 'submit':106C 'templat':42B,102C 'token':68B,125C 'unsanit':48B,111C 'url':39B,99C 'use':33B 'valu':109C 'vulner':85C 'xss':3A","nicknames":[],"mitigations":[],"who_affected":"Clinics and organizations running OpenEMR before 8.5.0 with the patient portal enabled. The flaw needs a patient portal account, so installations without the portal are less exposed. Staff who open the affected document templates are the ones whose sessions can be abused.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":[],"ptokens":[],"labels":["healthcare","high","openemr","other","patientportal","selfhosted"],"campaign_type":null,"search_a":"'-126451':14A,17A '-2026':13A,16A 'cve':12A,15A 'let':4A 'openemr':1A 'patient':6A 'portal':5A 'run':7A 'script':8A 'session':11A 'staff':10A 'store':2A 'xss':3A","search_b":"'8.5.0':29B 'admin':73B 'call':70B 'csrf':67B 'data':43B 'document':41B 'endpoint':74B 'health':64B 'healthcar':18B 'host':26B 'ifram':51B 'inform':65B 'javascript':38B 'later':46B 'let':30B 'member':58B 'openemr':19B,27B 'patient':22B,32B,35B 'patient-port':21B 'portal':23B,36B 'protect':63B 'read':62B 'render':47B 'run':54B 'script':53B 'self':25B 'self-host':24B 'session':60B 'staff':57B,71B 'store':37B 'templat':42B 'token':68B 'unsanit':48B 'url':39B 'use':33B","search_c":"'8.5.0':77C 'admin':130C 'allow':87C 'attack':104C 'call':127C 'contain':78C 'cross':82C 'cross-sit':81C 'csrf':124C 'data':103C 'document':101C 'documenttemplaterend':117C 'encounterform':108C 'endpoint':131C 'ifram':114C 'inject':97C 'javascript':92C,98C 'let':118C 'openemr':75C 'patient':89C 'phi':122C 'portal':88C 'read':121C 'render':110C 'run':91C 'script':84C,120C 'session':95C 'site':83C 'src':115C 'staff':94C,128C 'store':80C 'submit':106C 'templat':102C 'token':125C 'unsanit':111C 'url':99C 'valu':109C 'vulner':85C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-10-28T01:43:25+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-126451","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126451","severity":null,"published_at":"2026-11-13T10:17:52+00:00","modified_at":"2026-11-13T10:17:53+00:00","first_seen_at":"2026-11-13T10:47:23+00:00","fetched_at":"2026-11-13T10:47:23+00:00","note":null}],"documents":[{"id":145146,"url":"https://github.com/openemr/openemr/security/advisories/GHSA-hfpq-j3fj-cpmv","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-10-28T01:43:25+00:00","relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"},{"id":145147,"url":"https://www.vulncheck.com/advisories/openemr-before-8.5.0-stored-xss-via-document-template-rendering","title":"Third-party advisory: www.vulncheck.com","kind":"advisory","source":"nvd","publisher":"research","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Third-party advisory: www.vulncheck.com"}],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}