Categories
CVE-2026-41258 critical CVSS 9.1

Code Injection in org.openmrs.api:openmrs-api (CVE-2026-41258)

Summary

Code injection in org.openmrs.api:openmrs-api (CVE-2026-41258). Successful exploitation can lead to full system takeover. Exploitable via VelocityEngine. Mitigation: upgrade to 2.8.6 or later.

Original description

The description as published by the source.

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.

Source: NIST National Vulnerability Database NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-41258 has been found in org.openmrs.api:openmrs-api.
Attackers can target a specific entry point like VelocityEngine over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 9.1/10.
What to do: upgrade org.openmrs.api:openmrs-api to 2.8.6 or later.
If unsure, ask your IT team or search "org.openmrs.api:openmrs-api CVE-2026-41258" on the vendor's site.

CVE-2026-41258 (org.openmrs.api:openmrs-api) — CWE-94 / CVSS v3 9.1
Attack vector: remote (network-reachable) / no user interaction
Attack surface: VelocityEngine / SecureUberspector / UberspectImpl / Person
Patched: 2.8.6 — apply immediately
Workaround: Ensure the Manage Concepts privilege is restricted to only authorized users and carefully audit any ConceptReferenceRanges in the database.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

Arbitrary code execution (CWE-94) exists in org.openmrs.api:openmrs-api. Attackers reach the vulnerable code path via VelocityEngine.

📍 Affected scope

Check the vendor advisory for the affected versions of org.openmrs.api:openmrs-api. Attack surface: VelocityEngine / SecureUberspector / UberspectImpl / Person.

🔥 Severity

Severity: Critical (CVSS 9.1/10). Successful exploitation can lead to full system takeover.

🔧 How to fix

Update to 2.8.6.

🛡️ Workaround

Workaround: Ensure the Manage Concepts privilege is restricted to only authorized users and carefully audit any ConceptReferenceRanges in the database.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Audit SBOM/dependencies to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    Audit SBOM/dependencies for affected components.

    資産台帳・SBOM・依存マニフェストで org.openmrs.api:openmrs-api を使っているサービスとバージョンを洗い出す。

  2. 2
    Apply temporary workaround mitigate
    Ensure the `Manage Concepts` privilege is restricted to only authorized users and carefully audit any `ConceptReferenceRanges` in the database.

    パッチが適用されるまでの応急処置として、Ensure the Manage Concepts privilege is restricted to only authorized users and carefully audit any ConceptReferenceRanges in the database. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patch patch
    Upgrade org.openmrs.api:openmrs-api to 2.8.6

    ステージング環境で 2.8.6 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  4. 4
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

maven org.openmrs.api:openmrs-api
[{"type":"ECOSYSTEM","events":[{"introduced":"2.8.0"},{"fixed":"2.8.6"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details