OpenEMR EtherFax Module Authenticated Arbitrary File Read (CVE-2026-24849)
by doany1 · 2026-07-05
- Severity
- Critical
- CVE
- CVE-2026-24849
- Category
- web
- Affected product
- OpenEMR (Fax/SMS module, EtherFax provider)
- Affected versions
- OpenEMR < 7.0.4 (tested on 7.0.2)
- Disclosed
- 2026-07-05
- Patch status
- patched
Tags
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-06 |
| Author / Researcher | doany1 |
| CVE / Advisory | CVE-2026-24849 |
| Category | web |
| Severity | Critical |
| CVSS Score | NVD 6.5 (Medium) / GitHub CNA 9.9 (Critical) |
| Status | PoC |
| Tags | openemr, path-traversal, arbitrary-file-read, cwe-22, php, healthcare, phi-exposure, authenticated |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | OpenEMR (Fax/SMS module, EtherFax provider) |
| Versions Affected | OpenEMR < 7.0.4 (tested on 7.0.2) |
| Language / Platform | Python 3 PoC against a PHP/Apache target |
| Authentication Required | Yes (any valid session, no elevated privileges needed) |
| Network Access Required | Yes |
Summary
OpenEMR’s Fax/SMS module ships an EtherFax integration whose disposeDoc() handler (in EtherFaxActions.php) takes an attacker-controlled file_path request parameter, checks only that the file exists, and passes it directly to readfile() with no canonicalization or allow-listing. Because the parameter accepts an absolute path, no traversal sequence is even required, so any authenticated user regardless of role can read arbitrary files as the web-server user, including database credentials, patient documents, and system files such as /etc/passwd. The handler also calls unlink() on the file after reading it, which the PoC’s README calls out as a destructive side effect that can delete files the web server is permitted to remove. The included Python tool logs in, verifies exploitability against a safe probe file, and then supports one-shot or interactive reads of arbitrary paths, saving loot to disk if requested.
Vulnerability Details
Root Cause
EtherFaxActions::disposeDoc() reads the file_path request parameter, verifies only file_exists(), and passes it unsanitized to readfile() with no path canonicalization, allow-listing, or additional authorization check beyond an active session.
Attack Vector
- Attacker authenticates to OpenEMR with any valid account (default credentials often work).
- Attacker sends a
GETrequest to the Fax/SMS module dispatcher with_ACTION_COMMAND=disposeDocand an absolutefile_pathpointing at a sensitive file. - The server reads and returns the file’s contents, then attempts to delete it.
- Attacker repeats against
sites/default/sqlconf.php, patient document directories, or OS files to harvest credentials or PHI.
Impact
Full server-side arbitrary file read as the web-server user from any authenticated account, exposing database credentials and patient health information, with a secondary risk of unintended file deletion via the handler’s unlink() call.
Environment / Lab Setup
Target: OpenEMR < 7.0.4 with Fax/SMS module enabled, EtherFax selected as provider
Attacker: Python 3.6+, requests library
Proof of Concept
PoC Script
See
CVE-2026-24849.pyin this folder.
| |
The script authenticates via requests with a dedicated cookie jar, confirms the vulnerability by reading a safe root-owned probe file, then issues the disposeDoc (or disposeDocument, auto-tried for version differences) request to read the specified file, optionally dropping into an interactive loop to pull multiple files in one session.
Detection & Indicators of Compromise
Signs of compromise:
- Web server access logs showing repeated
disposeDoc/disposeDocumentrequests with varyingfile_pathvalues - Unexpected disappearance of files readable/writable by the web-server user (side effect of the handler’s
unlink()) - Low-privilege OpenEMR accounts accessing files unrelated to their normal patient workflow
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade to OpenEMR 7.0.4 or later, which canonicalizes the path, confines it to an allowed directory, and adds a proper authorization check |
| Interim mitigation | Disable the Fax/SMS module if unused, change default credentials, and store secrets/patient documents outside the webroot |
References
Notes
Mirrored from https://github.com/doany1/CVE-2026-24849 on 2026-07-05.
| |