CVE-2026-39932

OpenEMR 8.2.0 Remote Code Execution via CategoryTree eval() Injection

Published Aug 3, 2026 CVSS 4.0 · 9.4 Critical EPSS 2.0% KEV · Not listed
Description
OpenEMR through 8.2.0 contains a remote code execution vulnerability in the document category tree component (library/classes/Tree.class.php) that allows authenticated administrators to execute arbitrary operating system commands by injecting PHP payloads into the categories database table. Attackers can chain arbitrary SQL execution to alter the id column type to VARCHAR and insert a malicious PHP payload, which is then executed via an unsanitized eval() call whenever any page instantiates CategoryTree, including unauthenticated and low-privilege pages, resulting in command execution as the web server user.

Analysis

AI-generated

Technical impact

The vulnerability in OpenEMR allows authenticated administrators to inject PHP payloads into the categories database table, leading to arbitrary command execution on the server. It stems from an unsanitized eval() call in CategoryTree, classified as CWE-95. When exploited, the attacker can run any command as the web server user, compromising confidentiality, integrity, and availability of the entire application and underlying system.

Affected Systems

OpenEMR versions up to and including 8.2.0 are affected. The flaw resides in the document category tree component (library/classes/Tree.class.php) and can be triggered by a user with administrator privileges or a low-privilege user if the attacker can first modify the database via SQL injection.

Risk and Exploitability

The vulnerability scores a CVSS of 9.4, indicating very high severity, and is not listed in the CISA KEV catalog. The EPSS score is 2%, indicating a moderate likelihood of exploitation. The combination of required administrator privileges, SQL injection to alter the id column, and an eval() execution path suggests a high likelihood of exploitation in environments where the application is exposed to the internet. Attackers can chain SQL injection to set the id column to VARCHAR, insert malicious PHP, and trigger eval() on any page that loads CategoryTree, including unauthenticated pages. This results in command execution with web server privileges.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to the latest OpenEMR release that includes the CategoryTree eval() fix
  • If an update is not immediately possible, limit administrator access to the application and monitor for suspicious SQL activity
  • As a temporary measure, disable or remove the eval() call in library/classes/Tree.class.php, ensuring no user-entered data is processed by eval

Generated by OpenCVE AI on September 24, 2026 at 20:46 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Open-emr
Open-emr openemr
CPEs cpe:2.3:a:open-emr:openemr:*:*:*:*:*:*:*:*
Vendors & Products Open-emr
Open-emr openemr
Type Values Removed Values Added
First Time appeared Openemr
Openemr openemr
Vendors & Products Openemr
Openemr openemr
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description OpenEMR through 8.2.0 contains a remote code execution vulnerability in the document category tree component (library/classes/Tree.class.php) that allows authenticated administrators to execute arbitrary operating system commands by injecting PHP payloads into the categories database table. Attackers can chain arbitrary SQL execution to alter the id column type to VARCHAR and insert a malicious PHP payload, which is then executed via an unsanitized eval() call whenever any page instantiates CategoryTree, including unauthenticated and low-privilege pages, resulting in command execution as the web server user.
Title OpenEMR 8.2.0 Remote Code Execution via CategoryTree eval() Injection
Weaknesses CWE-95
References
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.4, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H'}

Weaknesses
  • CWE-95

    Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Aug 14, 2026, 4:49 PM
Reserved
Apr 7, 2026, 8:57 PM
Status
Analyzed
Published
Aug 3, 2026, 5:16 PM
Modified
Sep 1, 2026, 3:36 PM