{"id":"CVE-2026-41258","published":"2026-05-15T16:13:18Z","modified":"2026-05-15T16:40:36Z","title":"OpenMRS: Stored Velocity SSTI to RCE via ConceptReferenceRange","vendor":"openmrs","product":"openmrs-core","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.1,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0054,"percentile":0.38937,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/openmrs/openmrs-core/security/advisories/GHSA-xj4f-8jjg-vx4q","tags":["x_refsource_CONFIRM"]}],"priority":{"score":14.2,"factors":[{"name":"EPSS percentile","points":7.79},{"name":"CVSS severity","points":6.37}]},"vendorSlug":"openmrs","affectedVersions":[{"vendor":"openmrs","product":"openmrs-core","versions":[">= 2.7.0 < 2.7.9",">= 2.8.0 < 2.8.6"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-05-15T16:39:58.631532Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Maven","package":"org.openmrs.api:openmrs-api","vulnerableRanges":[">=2.7.0, <2.7.9",">=2.8.0, <2.8.6"],"patched":["2.7.9","2.8.6"],"from":["GHSA-xj4f-8jjg-vx4q"],"provenance":"source"}],"summary":{"text":"OpenMRS Core (openmrs-core) has a flaw in the ConceptReferenceRangeUtility.evaluateCriteria() method, which evaluates criteria strings stored in the database as Apache Velocity templates without sandboxing, so template expressions can perform unrestricted Java reflection. An attacker holding the Manage Concepts privilege can store a malicious template expression in a concept's reference range criteria, and it runs automatically whenever an observation is validated against that concept, with access to the patient, observation and service layer objects.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:51:06Z"},"euvd":{"id":"EUVD-2026-30558","exploited":false,"provenance":"source"}}