---
id: "CVE-2026-126493"
page: "https://infrastack.ai/live/CVE-2026-126493"
kind: "vulnerability"
aliases: ["CVE-2026-126493"]
title: "OpenEMR: stored XSS in patient portal activity API lets scripts run"
severity: "medium"
cvss: 5.4
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["healthcare", "openemr", "runtime", "self-hosted"]
not_affected_if: ["openemr-8.5.0-or-later", "patient-portal-disabled"]
published_at: "2026-11-13T10:17:59+00:00"
first_seen_at: "2026-11-13T10:47:27+00:00"
updated_at: "2026-11-13T10:56:51+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126493", "first_seen_at": "2026-11-13T10:47:27+00:00"}]
exploit_sources: []
---

# OpenEMR: stored XSS in patient portal activity API lets scripts run

Link for people: https://infrastack.ai/live/CVE-2026-126493 (this .md is for agents)

OpenEMR before 8.5.0 accepts a crafted tableArgs value in the onsiteportalactivity API that is stored and later rendered unescaped on the audit review page. A low-privileged patient portal user can inject JavaScript that runs in a provider's browser when they click the delete button.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed OpenEMR version against the fixed version in the vendor advisory.
- Confirm whether the patient portal is enabled and whether patients have portal accounts.

## Fix

- Upgrade OpenEMR to `8.5.0` or later.

## Timeline

- 2026-11-13T10:47:27+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-126493

## Documents

- [advisory] Vendor advisory: github.com https://github.com/openemr/openemr/security/advisories/GHSA-r4hm-frcj-qr39
- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/openemr-before-8.5.0-stored-xss-via-onsiteportalactivity-tableargs

## From the sources

OpenEMR before 8.5.0 contains a stored cross-site scripting vulnerability that allows low-privileged patient portal users to inject JavaScript via the tableArgs field of the onsiteportalactivity API. Attackers can store a payload with spaces that breaks out of an unquoted data-delete-id attribute, executing script when providers click the delete button on the audit review page.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
