Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate with Manage Concepts privilege
-
DeliveryAccess concept management interface
-
ExploitInject Velocity SSTI payload in reference range criteria
-
InstallPersist malicious template to database
-
C2Trigger observation validation against compromised concept
-
ExecuteExecute arbitrary Java code as Tomcat process
-
ImpactExfiltrate PHI or establish persistence
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires a valid OpenMRS account with the 'Manage Concepts' privilege, which is explicitly defined in OpenMRS as 'Able to add/edit/delete concept entries' and is typically granted to clinical informatics staff, terminology coordinators, and implementation administrators who maintain the clinical concept dictionary. The privilege is not restricted to system administrators, and vendor documentation indicates multiple facility staff commonly hold this privilege in typical healthcare deployments. The attacker must have network access to the OpenMRS web interface (AV:N from CVSS vector) to authenticate and access concept management functionality. Exploitation does not require any non-default configuration (AC:L) - the vulnerable ConceptReferenceRangeUtility.evaluateCriteria() method is active by default when concept reference ranges are used for clinical validation. No user interaction is required beyond the initial privilege abuse (UI:N). However, practical impact depends on whether the facility actively uses concept reference range criteria for observation validation; if this feature is unused, the vulnerable code path may not execute despite being present. The changed scope (S:C) reflects privilege escalation from concept management to arbitrary code execution as the Tomcat JVM process, transcending the intended security boundary of the 'Manage Concepts' privilege. |
| Impact | CVSS 9.1 (Critical) reflects attack vector network (AV:N), low complexity (AC:L), high privileges required (PR:H), no user interaction (UI:N), and changed scope (S:C) with full confidentiality, integrity, and availability impact. However, real-world risk is significantly nuanced by the privilege prerequisite. The 'Manage Concepts' privilege is described by the vendor as a content-management function for clinical dictionary administration, routinely granted to non-administrative clinical informatics staff at healthcare facilities. This creates a realistic privilege escalation path from clinical data management to full application server compromise. The persistence mechanism (database-stored payload executing on every observation validation) is particularly dangerous in healthcare environments where common clinical measurements trigger frequent automatic validations across all system users and API integrations. Protected Health Information (PHI) exfiltration requires no additional OS-level access since patient data objects are directly exposed in the Velocity context. The CVSS vector's high privilege requirement (PR:H) may understate risk if 'Manage Concepts' is widely distributed within typical OpenMRS deployments. No EPSS score provided, no CISA KEV listing indicates targeted rather than widespread exploitation. Patch availability is confirmed with specific fix versions from vendor GitHub advisory. Attack automation is feasible post-authentication with concept management privilege. SSVC decision: exploitation not confirmed active, automatable within authenticated scope, technical impact total (arbitrary code execution as Tomcat process). |
| Exploit ScenarioDerived | A medical records coordinator with 'Manage Concepts' privilege (granted for maintaining the clinical terminology dictionary) authenticates to the OpenMRS administration interface and navigates to concept management. The attacker creates or modifies a concept for a frequently used laboratory test (e.g., blood glucose measurement) and injects a malicious Velocity template expression into the reference range criteria field, such as a payload that invokes Java Runtime.exec() to establish a reverse shell or exfiltrate the patient database. The payload persists in the concept_reference_range database table. Subsequently, every time any clinician, automated lab interface, or mobile health application validates an observation against this concept, the ConceptReferenceRangeUtility.evaluateCriteria() method automatically executes the injected template as the Tomcat application server process, granting the attacker persistent code execution without further authentication. The attacker can exfiltrate Protected Health Information directly through the exposed $patient and $obs context objects or escalate to full server compromise. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 04, 2026
Server-side template injection in OpenMRS Core allows authenticated users with 'Manage Concepts' privilege to execute arbitrary Java code by injecting malicious Apache Velocity templates into concept reference range criteria fields. The vulnerability stems from unsafe VelocityEngine initialization without sandbox restrictions (no SecureUberspector), enabling unrestricted Java reflection. Exploitation persists across all facility users whenever observations are validated against the compromised concept, creating a persistent remote code execution vector. Fixed in versions 2.7.9 and 2.8.6 via migration from Velocity to sandboxed Spring Expression Language (SpEL) with SimpleEvaluationContext. No active exploitation confirmed (not in CISA KEV), but proof-of-concept details available from researcher advisory at machinespirits.com.
RemediationAI
Upgrade immediately to OpenMRS Core version 2.7.9 (for 2.7.x branch) or 2.8.6 (for 2.8.x branch) which replace the vulnerable Apache Velocity template engine with sandboxed Spring Expression Language (SpEL) using SimpleEvaluationContext. Patch commit available at https://github.com/openmrs/openmrs-core/commit/8d1c193. If immediate upgrade is not feasible, restrict 'Manage Concepts' privilege to only essential trusted personnel and implement database-level audit logging on the concept_reference_range table to detect injection attempts. Audit existing ConceptReferenceRanges in the database for suspicious criteria strings containing Velocity template syntax such as dollar-sign variable references, method invocations, or Java class references (search for patterns like '$', '.class', '.getClass()', 'Runtime'). Note that restricting the privilege may disrupt normal clinical dictionary maintenance workflows, requiring operational coordination. Database auditing adds performance overhead proportional to concept modification frequency. No partial mitigation fully eliminates risk short of upgrading; workarounds only reduce attack surface.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in maven, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
OpenMRS Core's ConceptReferenceRangeUtility.evaluateCriteria() method uses Apache Velocity template engine to evaluate database-stored criteria strings for clinical concept validation. The VelocityEngine was initialized with only logging configuration, using the default UberspectImpl introspector which permits unrestricted Java reflection through template expressions. The Velocity context exposes live OpenMRS objects including Patient/Person instances, Obs (observation) objects, and the ConceptReferenceRangeUtility service layer reference, providing direct access to the full application API and patient health information. CWE-94 (Improper Control of Generation of Code) applies as user-controlled data from the concept_reference_range VARCHAR(65535) database field is directly evaluated as executable template code. The patch replaces Velocity with Spring Expression Language (SpEL) using SimpleEvaluationContext with DataBindingPropertyAccessor (read-only), MapAccessor, and DataBindingMethodResolver, which restricts reflection capabilities and prevents arbitrary class instantiation. Expression parsing is cached via Caffeine cache with 20,000 entry maximum and 5-minute expiration to maintain performance.
Know when Java 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
AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Primary rating from Vendor (https://github.com/openmrs/openmrs-core) · only source for this CVE.
CVSS VectorVendor: https://github.com/openmrs/openmrs-core
DescriptionCVE.org
Impact
The ConceptReferenceRangeUtility.evaluateCriteria() method in OpenMRS Core evaluates database-stored criteria strings as Apache Velocity templates without any sandbox configuration. The VelocityEngine is initialized with only logging properties and noSecureUberspector, leaving the default UberspectImpl in place, which allows unrestricted Java reflection through template expressions.
A user with the Manage Concepts privilege can store a malicious Velocity template expression in a concept's reference range criteria field. This payload is then executed automatically whenever a user or API call validates an observation against the affected concept. The Velocity context exposes $patient (the Person / Patient object), $obs (the Obs object), and $fn (the ConceptReferenceRangeUtility instance with access to the full OpenMRS service layer).
Persistent Remote Code Execution: The payload persists in the concept_reference_range database table (VARCHAR 65535). A single compromised concept for a common clinical measurement executes the payload on every subsequent observation validation across all users, API clients, and integrations in the facility.
Privilege Escalation: The Manage Concepts privilege is a content-management function, defined as "Able to add/edit/delete concept entries", not an administrative privilege. Multiple non-admin staff per facility typically hold this privilege. The attacker escalates from concept dictionary management to arbitrary code execution as the Tomcat application server process.
PHI Exfiltration: The Velocity context objects directly expose patient data without requiring OS-level RCE.
Patches
This is fixed in 2.8.6 and 2.7.9 as well as future versions.
Workarounds
Ensure the Manage Concepts privilege is restricted to only authorized users and carefully audit any ConceptReferenceRanges in the database.
Resources
https://github.com/openmrs/openmrs-core/commit/8d1c193 https://www.machinespirits.com/advisory/1e8430/
Executive ViewAI
OpenMRS Core versions prior to 2.7.9 and 2.8.6 contain a critical server-side template injection vulnerability that allows authenticated users with concept management privileges to execute arbitrary Java code on the server. This vulnerability persists across all facility users and observations, creating a facility-wide remote code execution risk that could compromise patient data integrity, clinical operations, and system availability.
Apply vendor patch. Until patching is complete, restrict 'Manage Concepts' privilege to a minimal set of trusted administrative accounts and implement network-level access controls to limit who can reach OpenMRS concept management interfaces.
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
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
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.
Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m
Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti
Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent
Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug
JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up
Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up
The WLS Security component in Oracle WebLogic Server 10.3.6.0, 12.1.2.0, 12.1.3.0, and 12.2.1.0 allows remote attackers
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow
Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla
The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during
EUVD-2026-30558
GHSA-xj4f-8jjg-vx4q
NVD
CVE.org
EPSS
Exploit-DB