MedDream PACS Premium encapsulatedDoc arbitrary file read vulnerability
An authenticated user can supply an arbitrary file path to the encapsulatedDoc.php script, which then opens and returns the contents of that file. This allows reading sensitive files on the server, potentially leading to code execution.
Originally disclosed on Cisco Talos
An arbitrary file read vulnerability exists in the encapsulatedDoc functionality of MedDream PACS Premium 7.3.6.870. A specially crafted HTTP request can lead to an arbitrary file read.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The script takes a user-controlled path parameter and passes it directly to fopen without validating or restricting it to a specific directory.
Impact
An attacker could read sensitive files on the server, which could ultimately lead to arbitrary code execution.
What the attacker needed
Valid user account
How it was found
- Log in to the application to obtain a valid session.
- Send an HTTP GET request to /Pacs/encapsulatedDoc.php with a path parameter pointing to a target file and a mimetype parameter set to a known type.
- The server responds with the contents of the requested file.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
The web application has a page that takes a file path from the user and simply opens that file without checking if it is allowed. An attacker who is logged in can ask the server to read any file it has access to, such as configuration files or password files, and see the contents.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.