Security Digest · Vulnerability record

CVE-2026-41258: OpenMRS has Stored Velocity SSTI to RCE via ConceptReferenceRange

OpenMRS is an open source electronic medical record system platform.

CVSS 9.1 Critical EPSS 0.5% · p45

Should you act?

Critical, preconditions apply

Severe if exploited, but exploitation needs conditions that may not apply to you. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
  • EPSS 0.5%, percentile 45: FIRST’s model estimates a 0.5% chance of exploitation activity in the next 30 days, higher than 45% of all scored CVEs (low). EPSS is a probability, not a verdict.
  • Needs an account (high (admin)). Exposure depends on who can log in.
  • Only applies if your dependency tree includes org.openmrs.api:openmrs-api (Maven) >= 2.7.0, < 2.7.9, fixed in 2.7.9; org.openmrs.api:openmrs-api (Maven) >= 2.8.0, < 2.8.6, fixed in 2.8.6. Check your lockfile, including transitive dependencies.

What it is

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.

From the GitHub advisory

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 conceptreferencerange 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.

Weakness type: CWE-94.

Product: org.openmrs.api:openmrs-api (Maven) · Assigned by: GitHub_M · Published: 2026-05-15

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
Mavenorg.openmrs.api:openmrs-api>= 2.7.0, < 2.7.92.7.9
Mavenorg.openmrs.api:openmrs-api>= 2.8.0, < 2.8.62.8.6
VendorProductAffected versions (per CVE record)
openmrsopenmrs-core>= 2.7.0 < 2.7.9, >= 2.8.0 < 2.8.6

Severity scores

Scored byCVSSScoreVector
GitHub_M3.19.1 CriticalCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
GitHub3.19.1 CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Privileges required: high (admin)
  • User interaction: none
  • Scope: changed (can affect other components)

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation none, automatable no, technical impact total.
  • FIRST EPSS (model of 2026-10-21): 0.54% probability of exploitation activity in the next 30 days; percentile 45.

Timeline

  • — GitHub-reviewed advisory GHSA-xj4f-8jjg-vx4q published (critical)
  • — CVE record last updated
  • — CVE record published by GitHub_M

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-xj4f-8jjg-vx4q github.com
  2. CVE.org record CVE-2026-41258 cve.org
  3. NVD entry CVE-2026-41258 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com
  2. github.com github.com
  3. machinespirits.com machinespirits.com

Critical Maven advisories · Today’s Security Digest