The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-33303

CVE-2026-33303: OpenEMR Stored XSS Vulnerability

CVE-2026-33303 is a stored XSS flaw in OpenEMR that allows patient portal users to inject malicious scripts into staff browsers. This article covers the technical details, affected versions, impact, and mitigation.

Published: March 20, 2026

CVE-2026-33303 Overview

CVE-2026-33303 is a stored cross-site scripting (XSS) vulnerability affecting OpenEMR, a widely-used free and open source electronic health records (EHR) and medical practice management application. The vulnerability exists in versions prior to 8.0.0.2 due to unescaped portal_login_username in the portal credential print view.

This flaw enables a patient portal user to set their login username to a malicious XSS payload, which then executes in a clinic staff member's browser when they access the "Create Portal Login" page for that patient. This represents a significant security concern as it allows attacks to cross from the patient session context into the staff/admin session context.

Critical Impact

A malicious patient portal user can execute arbitrary JavaScript in clinic staff browsers, potentially leading to session hijacking, data theft, or privilege escalation within the healthcare application.

Affected Products

  • OpenEMR versions prior to 8.0.0.2
  • OpenEMR Patient Portal component
  • Portal Login Credential Print View functionality

Discovery Timeline

  • 2026-03-19 - CVE CVE-2026-33303 published to NVD
  • 2026-03-19 - Last updated in NVD database

Technical Details for CVE-2026-33303

Vulnerability Analysis

This stored XSS vulnerability (CWE-79) occurs in the patient portal credential print view functionality. The core issue stems from improper output encoding when rendering the portal_login_username field in the templates/patient/portal_login/print.html.twig template file.

When clinic staff navigate to the "Create Portal Login" page for a patient, the application renders the patient's stored username without proper HTML entity encoding. If an attacker has previously stored a malicious JavaScript payload as their username, this code executes within the authenticated staff member's browser session.

The attack vector requires network access and low privileges (patient portal account), but does require user interaction from a staff member viewing the affected page. The scope is changed, meaning the vulnerable component (patient portal) impacts a different security context (staff/admin session).

Root Cause

The root cause is insufficient input sanitization and output encoding in the Twig template responsible for rendering portal login credentials. The portal_login_username variable was directly interpolated into the HTML output without proper escaping, allowing raw HTML and JavaScript to be rendered as executable code rather than display text.

Attack Vector

The attack follows a stored XSS pattern that crosses trust boundaries:

  1. An attacker creates or modifies a patient portal account
  2. The attacker sets their login username to contain an XSS payload (e.g., <script>malicious_code</script>)
  3. When clinic staff access the "Create Portal Login" page for that patient, the payload executes
  4. The malicious JavaScript runs with the privileges of the staff member's session
  5. This can lead to session theft, data exfiltration, or further attacks against the healthcare system
twig
// Security patch in templates/patient/portal_login/print.html.twig
 * @link      http://www.open-emr.org
 * @author    Stephen Nielson <snielson@discoverandchange.com>
 * @author    Jerry Padgett <sjpadgett@gmail.com>
+* @author    Michael A. Smith <michael@opencoreemr.com>
 * @copyright Copyright (c) 2022 Discover and Change, Inc.
 * @copyright Copyright (c) 2024 Jerry Padgett <sjpadgett@gmail.com>
+* @copyright Copyright (c) 2026 OpenCoreEMR Inc <https://opencoreemr.com/>
 * @license   https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
 #}
 <html>

Source: GitHub Commit

Detection Methods for CVE-2026-33303

Indicators of Compromise

  • Unusual JavaScript or HTML tags present in patient portal usernames
  • Unexpected network requests originating from staff browsers when viewing patient portal pages
  • Error logs showing malformed username entries containing script tags or event handlers
  • Reports from staff of unexpected browser behavior when accessing patient portal management pages

Detection Strategies

  • Implement Content Security Policy (CSP) headers to detect and block inline script execution
  • Monitor web application logs for username fields containing HTML special characters (<, >, ", ')
  • Deploy web application firewall (WAF) rules to detect XSS patterns in user input fields
  • Conduct regular security audits of patient portal data for malicious content

Monitoring Recommendations

  • Enable verbose logging for patient portal username modifications
  • Set up alerts for CSP violation reports that may indicate XSS exploitation attempts
  • Monitor for abnormal session activity following staff access to patient portal management pages
  • Review audit logs for patient accounts with suspicious username patterns

How to Mitigate CVE-2026-33303

Immediate Actions Required

  • Upgrade OpenEMR to version 8.0.0.2 or later immediately
  • Review existing patient portal usernames for potentially malicious content
  • Implement Content Security Policy headers to provide defense-in-depth against XSS
  • Educate staff about the risks of accessing patient data from untrusted patient accounts

Patch Information

OpenEMR has released version 8.0.0.2 which addresses this vulnerability by implementing proper output encoding for the portal_login_username field. The fix ensures that user-supplied data is properly escaped before being rendered in HTML templates.

For detailed patch information, refer to the GitHub Security Advisory and the commit that addresses this issue.

Workarounds

  • If immediate patching is not possible, implement a web application firewall rule to sanitize username inputs
  • Review and sanitize existing patient usernames in the database for XSS payloads
  • Restrict staff access to the "Create Portal Login" page until the patch can be applied
  • Enable strict Content Security Policy headers to mitigate the impact of potential XSS exploitation
bash
# Configuration example - Add CSP headers to Apache configuration
# Add to .htaccess or Apache config for OpenEMR
Header set Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'"
Header set X-Content-Type-Options "nosniff"
Header set X-XSS-Protection "1; mode=block"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechOpenemr

  • SeverityMEDIUM

  • CVSS Score5.4

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • GitHub Commit Change

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-33348: OpenEMR Stored XSS Vulnerability

  • CVE-2026-33346: OpenEMR Stored XSS Vulnerability

  • CVE-2026-33299: OpenEMR Stored XSS Vulnerability

  • CVE-2026-32119: OpenEMR DOM-Based Stored XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English