CVE-2026-41258
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedOpenMRS 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceOpenMRS Core versions 2.7.0-2.7.8 and 2.8.0-2.8.5 contain an SSTI vulnerability where ConceptReferenceRangeUtility.evaluateCriteria() evaluates Velocity templates without sandboxing, allowing RCE via unsafe reflection through exposed $fn service layer access. Attackers with Manage Concepts privilege inject malicious templates into concept reference range criteria fields.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- High
- User interaction
- None
- Scope
- Changed
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify OpenMRS Core versionCheck the OpenMRS application Administration page or the 'openmrs' WAR file version manifest. Alternatively, query the 'global_property' table for 'openmrs.version' or check the pom.xml of the deployed openmrs-core artifact.Affected if Installed version is 2.7.0 through 2.7.8, or 2.8.0 through 2.8.5
-
Verify Manage Concepts privilege assignmentAccess the OpenMRS Administration > Manage Roles page. Review all roles that include the 'Manage Concepts' privilege. List all users assigned to those roles.Affected if Any user account other than trusted administrators holds the Manage Concepts privilege
-
Inspect concept reference range criteria valuesQuery the database table storing concept reference range data (typically 'concept_reference_range' or similar) or use OpenMRS > Administration > Concepts > View Concepts to review reference ranges. Examine the 'criteria' column/field for suspicious Velocity template syntax such as '$fn.', '#set', '#foreach', or '${'.Affected if Any concept reference range contains Velocity template language characters or expressions that resemble code injection
A user is affected if running OpenMRS Core versions 2.7.0-2.7.8 or 2.8.0-2.8.5 AND has the Manage Concepts privilege assigned to non-admin accounts, or if concept reference range criteria contain template injection patterns.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade immediately to version 2.7.9 or 2.8.6. Until patched, revoke 'Manage Concepts' privilege from untrusted users and audit existing concepts for suspicious criteria values.
Upgrade to OpenMRS Core 2.7.9 (for 2.7.x branch) or 2.8.6 (for 2.8.x branch)
- 1. Identify the current OpenMRS Core version by checking the OpenMRS administration interface or the runtime properties file
- 2. Determine which version branch you are currently on (2.7.x or 2.8.x) to select the appropriate upgrade target
- 3. Create a complete backup of the OpenMRS database and application files before proceeding with any upgrade
- 4. Download the fixed release: upgrade to version 2.7.9 if on the 2.7.x branch, or upgrade to version 2.8.6 if on the 2.8.x branch
- 5. Deploy the new OpenMRS Core WAR file to your application server
- 6. Run any database migration scripts provided with the upgrade
- 7. Verify the upgrade was successful by logging into the administration interface
- 8. Confirm the vulnerability is remediated by testing that Velocity template expressions in concept reference range criteria are no longer executed as code
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation8.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,120.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-41258 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-41258 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data