CVE-2026-41258: OpenMRS Core - Remote Code Execution
- Cve: CVE-2026-41258
- Name: OpenMRS Core - Remote Code Execution
- Description: OpenMRS is an open source electronic medical record system platform. From 2.7.0 to before 2.7.9 and 2.8.6, 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). This vulnerability is fixed in 2.7.9 and 2.8.6.
- Impact: Attackers with Manage Concepts privilege can execute arbitrary Java code remotely, potentially compromising the entire system.
- Remediation: Update to versions 2.7.9 or 2.8.6 or later.
- Vulnerability type: template_injection
- Vulnerability impact: remote_code_execution
- Requirement type: logged_in
- Requirements: Attacker must have Manage Concepts privilege
- Labels source: projectdiscovery
- Severity: critical
- Cvss score: 9.1
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
- Epss score: 0.00317
- Epss percentile: 0.25094
- Assignee: [email protected]
- Published at: 2026-05-15T17:16:46Z
- Age in days: 193
- Modified at: 2026-10-26T14:10:00Z
- References total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-41258
- Nvd status: deferred
- Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, products total, products, rejected by nvd
- Not known: hackerone
Cwe
| Id | Name |
|---|---|
| CWE-94 | Improper Control of Generation of Code |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/openmrs/openmrs-core/security/advisories/GHSA-xj4f-8jjg-vx4q | nvd |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| openmrs/openmrs-core | commit, fix, package, security_advisory | yes | /v1/repositories/openmrs/openmrs-core |
Index
- Repositories: 7
- Repositories high signal: 5
- Packages: 1
Exploitation
- Remote: yes
- Authentication required: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts