Vulnerability record · CVE-2020-36243 · published 7 February 2021
CVE-2020-36243: OpenEMR Patient Portal backup.php OS Command Injection
Open Emr · Openemr
OpenEMR 5.0.2.1 contains an OS command injection flaw in /interface/main/backup.php. An authenticated attacker can send a POST request with shell metacharacters to execute arbitrary operating system commands. Because OpenEMR handles patient records, command execution on the server puts sensitive health data and the host at risk.
Description
The Patient Portal of OpenEMR 5.0.2.1 is affected by a Command Injection vulnerability in /interface/main/backup.php. To exploit the vulnerability, an authenticated attacker can send a POST request that executes arbitrary OS commands via shell metacharacters.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Automated analysis
high priorityHigh CVSS (8.8) and very high EPSS with public exploit detail, though exploitation requires an authenticated account.
What it is
OpenEMR 5.0.2.1 contains an OS command injection flaw in /interface/main/backup.php. An authenticated attacker can send a POST request with shell metacharacters to execute arbitrary operating system commands. Because OpenEMR handles patient records, command execution on the server puts sensitive health data and the host at risk.
Impact
An attacker with a valid account gains arbitrary OS command execution on the OpenEMR server, enabling data theft, tampering, or full host compromise.
Attack surface
Reachable over the network via HTTP POST to /interface/main/backup.php; the CVSS vector shows PR:L, so a low-privileged authenticated account is required and no user interaction is needed.
Exploitation
Not listed in CISA KEV, but EPSS is 0.64144 (99.19th percentile) and references include an Exploit-tagged third-party advisory, indicating public exploit detail exists.
What to do
- Apply the OpenEMR 5.0.2 Patch 5 or later vendor patch immediately.
- Restrict access to /interface/main/backup.php to trusted administrative networks or roles.
- Remove or disable unused backup functionality and enforce least privilege on OpenEMR accounts.
- Audit and rotate credentials for any account that could reach the affected endpoint.
- Monitor the server for unexpected child processes spawned by the web server user.
Detection
- Inspect HTTP POST bodies to /interface/main/backup.php for shell metacharacters such as ;, |, &&, $(), or backticks.
- Alert on web server or PHP-FPM processes spawning shells or system utilities like sh, bash, curl, or wget.
- Review OpenEMR authentication logs for unusual access to backup.php by low-privileged users.
- Hunt for outbound connections or file writes originating from the OpenEMR web process.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
| Link | Tags |
|---|---|
| https://blog.sonarsource.com/openemr-5-0-2-1-command-injection-vulnerability | ExploitThird Party Advisory |
| https://community.open-emr.org/t/openemr-5-0-2-patch-5-has-been-released/15431 | PatchRelease NotesVendor Advisory |
| https://community.sonarsource.com/t/openemr-5-0-2-1-command-injection-vulnerability-puts-health-records-at-risk/33592 | PatchVendor Advisory |
| https://www.open-emr.org/wiki/index.php/OpenEMR_Patches | PatchVendor Advisory |
| https://blog.sonarsource.com/openemr-5-0-2-1-command-injection-vulnerability | ExploitThird Party Advisory |
| https://community.open-emr.org/t/openemr-5-0-2-patch-5-has-been-released/15431 | PatchRelease NotesVendor Advisory |
| https://community.sonarsource.com/t/openemr-5-0-2-1-command-injection-vulnerability-puts-health-records-at-risk/33592 | PatchVendor Advisory |
| https://www.open-emr.org/wiki/index.php/OpenEMR_Patches | PatchVendor Advisory |
Track CVE-2020-36243 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2020-36243), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.