Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain OpenEMR admin credentials
-
DeliveryRun SQL to alter categories id column to VARCHAR
-
ExploitInsert malicious PHP payload row
-
ExecutionAny page instantiates CategoryTree
-
PersistUnsanitized eval() executes payload
-
ImpactCommand execution as web server user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Eval input sanitization
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an authenticated OpenEMR administrator account (or equivalent ability to run arbitrary SQL), consistent with CVSS PR:H, plus the target running OpenEMR 8.2.0 or earlier with the standard Tree.class.php/CategoryTree component. The concrete steps are: use SQL execution to ALTER the categories table id column to VARCHAR, then INSERT a PHP payload row. The key limiting factor is the admin/SQL privilege prerequisite - this is not a default-configuration pre-auth RCE. The key amplifier is that once the payload is stored, the malicious eval() fires whenever any page instantiates CategoryTree, including unauthenticated and low-privilege pages, so no special configuration flag needs to be enabled and no further authentication is needed to trigger execution. |
| Impact | The vendor-supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H, score 9.4) reflects network-reachable, low-complexity exploitation that nonetheless requires high privileges (PR:H) - an administrator account - while producing full confidentiality, integrity and availability impact on both the vulnerable and subsequent systems. The PR:H is the single biggest limiter: an attacker must already hold admin (or the ability to run arbitrary SQL) before planting the payload, so this is a privilege-escalation-to-code-execution and persistence primitive rather than a pre-auth internet worm. Publicly available exploit code raises operational risk and lowers the skill barrier, but POC availability is distinct from active exploitation - this CVE is not in CISA KEV, and no EPSS score was provided, so widespread automated exploitation cannot be asserted. The notable amplifier is that the injected payload executes on unauthenticated pages, meaning post-implant triggering needs no privileges at all; treat this as a high priority for any internet-exposed OpenEMR handling PHI, but weight it behind unauthenticated-RCE issues given the admin prerequisite. |
| Exploit ScenarioDerived | An attacker who has obtained OpenEMR administrator credentials (via phishing, credential reuse, or a chained lower-severity flaw) uses the admin-accessible SQL execution path to alter the categories table id column to VARCHAR and insert a PHP web-shell payload. On the next request to any page that instantiates CategoryTree - including pages reachable without authentication - the unsanitized eval() runs the payload, giving the attacker command execution as the web server user. A public POC exists, so this can be reproduced quickly against a matching version. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 03, 2026
Remote code execution in OpenEMR through 8.2.0 lets an authenticated administrator poison the document category tree so that arbitrary PHP runs as the web server user. The flaw lives in library/classes/Tree.class.php, where an attacker chains SQL execution to change the categories table id column to VARCHAR and store a PHP payload that a later unsanitized eval() executes every time any page - including unauthenticated and low-privilege ones - instantiates CategoryTree, turning a one-time admin action into a persistent server-wide backdoor. Publicly available exploit code exists (documented by VulnCheck and Jiva Security), and CVSS 4.0 is 9.4; no active exploitation is confirmed in CISA KEV at time of analysis.
RemediationAI
Upgrade to a fixed OpenEMR release above 8.2.0 once available; the source data does not include an exact patched version, so no vendor-released fix version is independently confirmed at time of analysis - track the VulnCheck advisory (https://www.vulncheck.com/advisories/openemr-remote-code-execution-via-categorytree-eval-injection) and the OpenEMR project for the tagged release. Until a patch is applied, tightly restrict administrative access and the ability to run raw SQL, since exploitation requires that privilege level; audit the categories table for an id column that has been altered to VARCHAR or that contains PHP code, and restore the column to its integer type to neutralize any planted payload (side effect: legitimate non-numeric category ids, if any custom ones exist, would break - verify before enforcing). Place OpenEMR behind a VPN or IP allowlist so unauthenticated pages that instantiate CategoryTree are not reachable from the internet (trade-off: reduces convenience of patient/remote portals), and enable database and web-server logging to detect the eval() trigger. Review the Jiva Security write-up (https://jivasecurity.com/writeups/openemr-eval-rce-category-tree-cve-2026-39932) for indicators.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
OpenEMR is a PHP-based open-source electronic health records and medical practice management system. The vulnerable component is the CategoryTree class in library/classes/Tree.class.php, which builds the document category hierarchy from rows in the categories database table. The root cause is CWE-95 (Improper Neutralization of Directives in Dynamically Evaluated Code, i.e. eval injection): category data read from the database is passed into a PHP eval() call without sanitization. Because the id column is normally an integer, the attacker first uses arbitrary SQL execution to alter the column to VARCHAR, allowing a text PHP payload to be stored where the tree-building logic will later feed it to eval(). The single affected package is identified by CPE cpe:2.3:a:openemr:openemr, with all versions up to and including 8.2.0 in scope.
Know when Openemr gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Requires admin/SQL privileges so PR:H; network-reachable and low-complexity; stored payload later executes via unauthenticated pages as the web-server user, justifying S:C with full C/I/A impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Articles & Coverage 1
Executive ViewAI
OpenEMR versions through 8.2.0 contain a critical remote code execution vulnerability (CVE-2026-39932, CVSS 9.4) that allows an authenticated administrator to establish a persistent server-wide backdoor through document category manipulation, enabling arbitrary code execution accessible to all users including unauthenticated ones. This represents complete compromise of confidentiality, integrity, and availability for any healthcare organization running affected versions. Immediate mitigation is required to protect patient data and operational continuity.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict administrator console access via network firewall and VPN-only policies; (2) Implement continuous database monitoring and alerting for categories table schema changes (VARCHAR conversions, new columns); (3) Deploy file integrity monitoring on library/classes/Tree.class.php and related files; (4) Disable or restrict document category management features if operationally feasible; (5) Enforce application-level database user permissions with least privilege; (6) Maintain immutable offline backups; (7) Monitor for eval() execution patterns and suspicious PHP execution in web server audit logs.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
An authenticated SQL injection vulnerability exists in OpenEMR ≤ 4.1.1 Patch 14 that allows a low-privileged attacker to
Unauthenticated token disclosure in OpenEMR before 8.0.0. CVSS 10.0. PoC and patch available.
Path traversal in OpenEMR 7.0.4 disposeDocument() allows file access. PoC available.
Path traversal in OpenEMR electronic health records before fix allows authenticated users to read arbitrary files on the
SQL injection in OpenEMR electronic health records before fix. Authenticated users can execute arbitrary SQL through the
OpenEMR 7.0.2 is vulnerable to SQL Injection via \openemr\library\classes\Pharmacy.class.php, \controllers\C_Pharmacy.cl
An issue in OpenEMR 7.0.2 allows a remote attacker to escalate privileges viaa crafted POST request using the noteid par
Information disclosure in OpenEMR 5.0.2 to before 8.0.0 exposes sensitive data. PoC and patch available.
interface/fax/fax_dispatch.php in OpenEMR 4.1.0 allows remote authenticated users to execute arbitrary commands via shel
interface/globals.php in OpenEMR 2.x, 3.x, and 4.x before 4.2.0 patch 2 allows remote attackers to bypass authentication
Authentication bypass vulnerability in portal/account/register.php in versions of OpenEMR before 5.0.1.4 allows a remote
OpenEMR 5.0.0 and prior allows low-privilege users to upload files of dangerous types which can result in arbitrary code
EUVD-2026-52345
GHSA-pj78-c8jq-8xhf
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB