CVE-2026-126493: 
OpenEMR Analyse et atténuation de la vulnérabilité

Aperçu

CVE-2026-126493 is a stored cross-site scripting (XSS) vulnerability in OpenEMR before version 8.5.0, affecting the patient portal's onsiteportalactivity API. A low-privileged patient portal user can inject malicious JavaScript via the tableArgs field, which is later executed in a provider or administrator's browser when they interact with the audit review page. The vulnerability was published on October 28, 2026, by researcher Leousum, with the GitHub Security Advisory (GHSA-r4hm-frcj-qr39) serving as the primary disclosure source. It carries a CVSS v3.1 base score of 5.4 (Medium) per NVD, though the GitHub advisory rates it 8.7 (High) with broader confidentiality and integrity impact (GitHub Advisory).

Détails techniques

The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation), specifically an unquoted HTML attribute injection. The vulnerable endpoint is POST /portal/patient/api/onsiteportalactivity, where the tableArgs field is stored without sufficient sanitization. Although the template at OnsiteActivityViewListView.tpl.php:127 applies _.escape() to the value, the output is placed into an unquoted HTML attribute (data-delete-id=<%= _.escape(item.get('tableArgs') || '') %>), allowing a payload containing spaces to break out of the attribute and inject additional HTML attributes such as onclick=alert(1). Exploitation requires a valid patient portal account and provider/admin interaction with the audit review page at /portal/patient/onsiteactivityviews (GitHub Advisory).

Impact

Successful exploitation allows attacker-controlled JavaScript to execute in the browser session of a privileged provider or administrator, enabling session theft, credential harvesting, and action forgery within the EMR's privileged review interface. Because the script runs in the provider's authenticated context, an attacker could perform unauthorized clinical or administrative actions, access sensitive patient health information, or pivot further within the OpenEMR application. Availability is not directly impacted, but confidentiality and integrity of provider sessions and patient data are at risk (GitHub Advisory).

Exploitabilité

A proof-of-concept Python script is publicly available in the GitHub Security Advisory, demonstrating the full attack flow using the requests library to POST a crafted tableArgs payload to the vulnerable endpoint. The EPSS score is approximately 0.00235, indicating low current exploitation probability. There is no evidence of in-the-wild exploitation at this time, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The NVD SSVC assessment classifies exploitation status as "poc" and notes the attack is not automatable due to the required provider interaction (GitHub Advisory).

Étapes d’exploitation

  1. Obtain a patient portal account: Register or obtain credentials for a low-privileged patient portal account on a vulnerable OpenEMR instance (version < 8.5.0).
  2. Authenticate and capture session cookies: Log in to the patient portal and capture the session cookies (App=PortalOpenEMR and PortalOpenEMR=<session_token>).
  3. Craft and submit the malicious payload: Send an authenticated POST request to /portal/patient/api/onsiteportalactivity with a JSON body where tableArgs is set to a value that breaks out of the unquoted attribute, e.g., "tableArgs": "1 onclick=alert(1) foo=". For a real attack, replace alert(1) with a payload that exfiltrates the provider's session cookie or performs forged actions.
  4. Confirm storage: Verify the record is stored by checking the API response or querying the activity log.
  5. Wait for provider interaction: The injected payload executes when a provider or administrator navigates to http://<target>/portal/patient/onsiteactivityviews and clicks the delete button on the malicious record, triggering the injected onclick handler in their browser context.
  6. Harvest session or perform actions: The executing JavaScript can steal the provider's session token, perform unauthorized EMR actions, or exfiltrate sensitive patient data (GitHub Advisory).

Indicateurs de compromis

  • Network: Unusual or unexpected POST requests to /portal/patient/api/onsiteportalactivity containing tableArgs values with spaces and HTML event handler keywords (e.g., onclick, onerror, onmouseover); outbound requests from the provider's browser to unknown external domains following interaction with the audit review page.
  • Logs: OpenEMR application or web server access logs showing POST requests to the onsiteportalactivity endpoint with anomalous tableArgs values; provider access to /portal/patient/onsiteactivityviews shortly after a suspicious patient portal submission.
  • File System: No direct file system artifacts expected for this XSS; however, unexpected changes to OpenEMR configuration or user account settings may indicate follow-on actions taken via the injected script.
  • Database: Records in the onsite_portal_activity table where the table_args column contains HTML event handler strings (e.g., onclick=, onerror=) or JavaScript keywords (GitHub Advisory).

Atténuation et solutions de contournement

Upgrade OpenEMR to version 8.5.0 or later, which addresses this vulnerability. As a workaround prior to patching, administrators should ensure the tableArgs field is properly output-encoded within quoted HTML attributes in OnsiteActivityViewListView.tpl.php, and consider restricting patient portal API access to trusted users. Monitoring API logs for suspicious tableArgs values and limiting provider exposure to the audit review page can reduce risk until patching is complete (GitHub Advisory).

Réactions de la communauté

The vulnerability was reported by researcher Leousum and published by OpenEMR maintainer bradymiller via the GitHub Security Advisory program. No significant broader media coverage or notable social media commentary has been identified at this time.

Ressources supplémentaires


Source: Ce rapport a été généré à l’aide de l’IA

Connexe OpenEMR Vulnérabilités :

CVE ID

Gravité

Partition

Technologies

Nom du composant

Exploit CISA KEV

A corrigé

Date de publication

CVE-2026-126491HIGH8.3
  • OpenEMR logoOpenEMR
  • cpe:2.3:a:open-emr:openemr
NonOuiNov 13, 2026
CVE-2026-126494HIGH7.1
  • OpenEMR logoOpenEMR
  • cpe:2.3:a:open-emr:openemr
NonOuiNov 13, 2026
CVE-2026-126492HIGH7.1
  • OpenEMR logoOpenEMR
  • cpe:2.3:a:open-emr:openemr
NonOuiNov 13, 2026
CVE-2026-134020MEDIUM6.5
  • OpenEMR logoOpenEMR
  • cpe:2.3:a:open-emr:openemr
NonOuiNov 23, 2026
CVE-2026-126493MEDIUM4.8
  • OpenEMR logoOpenEMR
  • cpe:2.3:a:open-emr:openemr
NonOuiNov 13, 2026

Évaluation gratuite des vulnérabilités

Évaluez votre posture de sécurité cloud

Évaluez vos pratiques de sécurité cloud dans 9 domaines de sécurité afin d’évaluer votre niveau de risque et d’identifier les lacunes dans vos défenses.

Évaluation de la demande

Ressources Wiz supplémentaires

Obtenez une démo personnalisée

Prêt(e) à voir Wiz en action ?

"La meilleure expérience utilisateur que j’ai jamais vue, offre une visibilité totale sur les workloads cloud."
David EstlickRSSI
"Wiz fournit une interface unique pour voir ce qui se passe dans nos environnements cloud."
Adam FletcherChef du service de sécurité
"Nous savons que si Wiz identifie quelque chose comme critique, c’est qu’il l’est réellement."
Greg PoniatowskiResponsable de la gestion des menaces et des vulnérabilités