Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-33933

CVE-2026-33933: OpenEMR Reflected XSS Vulnerability

CVE-2026-33933 is a reflected cross-site scripting flaw in OpenEMR's custom template editor that allows unauthenticated attackers to execute malicious JavaScript. This article covers technical details, affected versions, and patches.

Published: March 27, 2026

CVE-2026-33933 Overview

CVE-2026-33933 is a reflected cross-site scripting (XSS) vulnerability affecting OpenEMR, a widely-used free and open source electronic health records (EHR) and medical practice management application. This vulnerability exists in the custom template editor component and allows an attacker to execute arbitrary JavaScript code in an authenticated staff member's browser session by sending them a specially crafted URL.

The attack requires no OpenEMR account, making it particularly dangerous in healthcare environments where patient data confidentiality is paramount. Successful exploitation could lead to session hijacking, credential theft, or unauthorized access to sensitive medical records.

Critical Impact

Unauthenticated attackers can execute arbitrary JavaScript in authenticated healthcare staff browser sessions, potentially compromising patient data confidentiality and system integrity.

Affected Products

  • OpenEMR versions 7.0.2.1 through 8.0.0.2
  • open-emr openemr

Discovery Timeline

  • 2026-03-26 - CVE CVE-2026-33933 published to NVD
  • 2026-03-26 - Last updated in NVD database

Technical Details for CVE-2026-33933

Vulnerability Analysis

This reflected XSS vulnerability resides in the custom template editor functionality within OpenEMR. The flaw occurs due to improper sanitization of user-supplied input in the library/custom_template/custom_template.php file. When processing context names from user input, the application fails to properly encode output before rendering it in the HTML response.

The vulnerable code path allows an attacker to inject malicious JavaScript through the context name parameter. When a legitimate user clicks on a crafted URL containing the malicious payload, the script executes within their authenticated browser session with full access to their session cookies and DOM.

Given that OpenEMR is deployed in healthcare environments handling Protected Health Information (PHI), successful exploitation could result in HIPAA compliance violations and exposure of sensitive patient medical records.

Root Cause

The root cause of this vulnerability is insufficient output encoding in the custom template editor. Specifically, when the application constructs HTML output containing the $contextName variable, it directly concatenates user-controlled input without proper XSS sanitization using the xlt() translation function or HTML encoding.

The patch addresses this by separating the user-controlled context name from the contextual hint message. Instead of appending unsanitized content directly to $contextName, the fix introduces a new $contextHint variable that safely encodes the additional messaging, preventing script injection.

Attack Vector

The attack is network-based and requires user interaction. An attacker constructs a malicious URL targeting the custom template editor endpoint with a crafted context name parameter containing JavaScript payload. The attacker then uses social engineering techniques such as phishing emails to trick authenticated OpenEMR staff into clicking the malicious link.

When the victim clicks the link while authenticated, the reflected JavaScript executes in their browser context, allowing the attacker to:

  • Steal session tokens and authentication cookies
  • Perform actions on behalf of the victim user
  • Access and exfiltrate sensitive patient data visible in the session
  • Modify patient records or system configurations
php
// Vulnerable code pattern (before patch)
// The $contextName variable was directly concatenated with HTML output
if (empty($isNN) && empty($rowContext)) {
    $contextName .= " <small><em>(" . xlt("Add Missing Context Template.") . ")</em></small>";
}

// Patched code - separates user input from HTML hint
$contextHint = '';
if (empty($isNN) && empty($rowContext)) {
    $contextHint = " <small><em>(" . xlt("Add Missing Context Template.") . ")</em></small>";
}

Source: GitHub Commit Update

Detection Methods for CVE-2026-33933

Indicators of Compromise

  • Suspicious URLs in web server access logs containing encoded script tags or JavaScript in the custom_template.php endpoint parameters
  • Unusual GET requests to /library/custom_template/custom_template.php with abnormally long or encoded query strings
  • Browser console errors or alerts triggered from the OpenEMR application domain that reference external scripts
  • User reports of unexpected pop-ups or behavior when accessing template editor functionality

Detection Strategies

  • Implement web application firewall (WAF) rules to detect and block requests containing common XSS payloads targeting the custom template editor endpoint
  • Enable verbose logging on OpenEMR web servers and configure SIEM alerts for suspicious URL patterns containing <script>, javascript:, or event handlers like onerror
  • Deploy browser-based security controls such as Content Security Policy (CSP) headers to limit script execution sources
  • Conduct periodic log analysis for anomalous access patterns to the custom_template.php file

Monitoring Recommendations

  • Configure real-time alerting for HTTP requests to OpenEMR containing URL-encoded characters indicative of XSS attempts (e.g., %3Cscript%3E, %22onload%3D)
  • Monitor authentication logs for session anomalies that may indicate session hijacking following successful XSS exploitation
  • Implement endpoint detection and response (EDR) solutions to identify suspicious JavaScript execution or data exfiltration attempts from browser processes

How to Mitigate CVE-2026-33933

Immediate Actions Required

  • Upgrade OpenEMR to version 8.0.0.3 or later immediately, as this version contains the security patch
  • Implement Content Security Policy (CSP) headers to restrict inline script execution as a defense-in-depth measure
  • Educate staff about phishing risks and the importance of not clicking links in unsolicited emails
  • Review access logs for any historical exploitation attempts targeting the custom template editor

Patch Information

OpenEMR has released version 8.0.0.3 which addresses this vulnerability. The fix is implemented across multiple commits that properly separate user-controlled input from HTML output and ensure proper encoding of context variables.

Organizations should apply the update by downloading the patched version from the official OpenEMR release page. For detailed technical information about the vulnerability, refer to the GitHub Security Advisory GHSA-9qh7-cfq4-j7c3.

Workarounds

  • If immediate patching is not possible, consider restricting access to the custom template editor functionality through web server access controls
  • Implement a web application firewall (WAF) with XSS detection rules in front of the OpenEMR application
  • Configure HTTP response headers including X-XSS-Protection: 1; mode=block and strict CSP policies to mitigate XSS impact
  • Limit network access to OpenEMR instances to trusted internal networks only, reducing exposure to external attackers
bash
# Example Apache configuration to add security headers
<IfModule mod_headers.c>
    # Enable XSS filtering in browsers
    Header always set X-XSS-Protection "1; mode=block"
    
    # Restrict script sources to same-origin only
    Header always set Content-Security-Policy "default-src 'self'; script-src 'self'"
    
    # Prevent MIME type sniffing
    Header always set X-Content-Type-Options "nosniff"
</IfModule>

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

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechOpen Emr

  • SeverityMEDIUM

  • CVSS Score6.1

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • GitHub Release v8.0.0.3
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Commit Fix

  • GitHub Security Advisory GHSA-9qh7-cfq4-j7c3
  • Related CVEs
  • CVE-2026-33932: OpenEMR Stored XSS Vulnerability

  • CVE-2026-33912: Open-emr OpenEMR XSS Vulnerability

  • CVE-2026-33911: OpenEMR Cross-Site Scripting Vulnerability

  • CVE-2025-67491: OpenEMR 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