Code Injection in OpenMRS - CVE-2026-41258
Published: May 4, 2026
OpenMRS
Detailed vulnerability description
The vulnerability allows a remote user to execute arbitrary code.
The vulnerability exists due to improper control of code generation in ConceptReferenceRangeUtility.evaluateCriteria() when evaluating database-stored criteria strings as Apache Velocity templates. A remote privileged user can store a malicious Velocity template expression in a concept's reference range criteria field to execute arbitrary code.
The payload is executed automatically whenever an observation is validated against the affected concept, and the template context exposes patient and observation objects as well as the utility instance with access to the service layer.