CVE-2018-1000649
Description
LibreHealthIO lh-ehr version REL-2.0.0 contains a Authenticated Unrestricted File Write in letter.php (2) vulnerability in Patient file letter functions that can result in Write files with malicious content and may lead to remote code execution. This attack appear to be exploitable via User controlled input.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Authenticated unrestricted file write in LibreHealthIO lh-ehr REL-2.0.0 allows remote code execution via crafted file content in letter.php.
Vulnerability
The vulnerability exists in lh-ehr//interface/patient_file/letter.php at line 278, where the fopen() function writes to a file path constructed from user-controlled $_POST['form_template'] without proper sanitization. The file content is also user-controlled via $temp_bodytext (line 284). This allows an authenticated attacker to write arbitrary files, including PHP scripts, to any location writable by the web server. Affected version: REL-2.0.0 [1][2].
Exploitation
An attacker must be authenticated to the application. They can craft a POST request to letter.php with a form_template parameter containing a path traversal (e.g., ../../some/path/shell.php) and a temp_bodytext parameter containing malicious PHP code. The server will write the file to the specified location. No additional user interaction is required beyond authentication [1][2].
Impact
Successful exploitation allows the attacker to write arbitrary files with malicious content, such as a PHP web shell, leading to remote code execution on the server. The attacker gains the same privileges as the web server user, potentially compromising the entire application and underlying system [1][2].
Mitigation
As of the disclosure timeline (July 2018), no fix had been released. The issue was reported on 23 July 2018 and remains unresolved in the available references. Users should restrict access to the affected endpoint, apply input validation, and monitor for updates from LibreHealthIO. The vulnerability is not listed on CISA's Known Exploited Vulnerabilities (KEV) catalog [1][2].
AI Insight generated on May 26, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2EventPlanning, INTERN, REL-2_0_0, …+ 1 more
- (no CPE)range: EventPlanning, INTERN, REL-2_0_0, …
- (no CPE)range: = REL-2.0.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
2- 0dd.zone/2018/08/07/lh-ehr-Authenticated-File-Write-Letter-PHP-2/mitrex_refsource_MISC
- github.com/LibreHealthIO/lh-ehr/issues/1214mitrex_refsource_MISC
News mentions
0No linked articles in our index yet.