cbcvebase.
CVE-2018-15142
published 2018-08-13

CVE-2018-15142: Directory traversal in portal/import_template.php in versions of OpenEMR before 5.0.1.4 allows a remote attacker authenticated in the patient portal to execute…

PriorityP269high8.8CVSS 3.0
AVNACLPRLUINSUCHIHAH
EXPLOIT
EPSS
18.21%
96.8th percentile
Directory traversal in portal/import_template.php in versions of OpenEMR before 5.0.1.4 allows a remote attacker authenticated in the patient portal to execute arbitrary PHP code by writing a file with a PHP extension via the "docid" and "content" parameters and accessing it in the traversed directory.

Affected

1 ranges
VendorProductVersion rangeFixed in
open-emropenemr< 5.0.1.45.0.1.4

Detection & IOCsextracted from sources · hover to see the quote

path/openemr/portal/import_template.php
filenamepayload.php
commandmode=delete&docid=payload.php
  • Monitor POST requests to /openemr/portal/import_template.php — exploitation uses the 'docid' and 'content' parameters for directory traversal and PHP file write, and the 'mode=delete' parameter for arbitrary file deletion.
  • After exploitation, attacker navigates to the dropped PHP webshell at http://hostname/openemr/portal/<payload>.php — monitor for GET requests to .php files in the portal directory that were not previously present.
  • Content-Type of exploit requests is application/x-www-form-urlencoded; correlate with POST to import_template.php from patient-portal authenticated sessions (presence of OpenEMR and PHPSESSID cookies).
  • ·Exploitation requires the attacker to be authenticated in the patient portal — unauthenticated exploitation is not possible; detections should be scoped to authenticated portal sessions.
  • ·Vulnerable versions are OpenEMR before 5.0.1.4; the PoC was demonstrated against version 5.0.1.3 specifically.

CVSS provenance

nvdv3.08.8HIGHCVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvdv2.06.5MEDIUMAV:N/AC:L/Au:S/C:P/I:P/A:P
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.