No account, a report preview, root on the box. openIMIS exposes a report previewer that renders a caller-supplied ReportBro definition with no authentication of any kind, and each report element carries a printIf expression that the server evaluates in a restricted sandbox. The sandbox hands that expression the whole datetime module, and datetime carries a plain, non-underscore sys attribute. From datetime.sys the expression reaches sys.modules['os'], calls os.system, and runs commands as root in the backend container. The only thing standing between an anonymous request and the host is a blocklist of two string prefixes.

TL;DR
The defect:
reportbro_previewer(report/views.py:78) evaluates an attacker-suppliedprintIfexpression throughsimpleevalwith no authentication, and the evaluator's function table exposes the wholedatetimemodule instead of a single class.What it grant: Unauthenticated remote code execution as root in the backend container, proven to the benign marker
uid=0(root) gid=0(root) groups=0(root). No account, session, JWT, or CSRF token.The tell: The endpoint's own CORS policy allow-lists the
Authorizationheader (report/views.py:88-91), and the sibling view one function up checkshas_perms(report/views.py:22-45). The project expected this endpoint to be guarded. It is the only report view that is not.Reach: Stock code. The endpoint lives under
/api/report/, the same prefix and web server as login and GraphQL, so if the instance is reachable by its own users at all, this endpoint is reachable identically.Status: Reproduced on
ghcr.io/openimis/openimis-be:develop. Fixed in the openIMIS 2026-10 release.
At a Glance
CVE | CVE-2026-82489 |
Product | openIMIS backend, |
Class | CWE-94, Code Injection (with CWE-306, Missing Authentication for Critical Function) |
Root cause | Unauthenticated endpoint evaluates a |
Impact | Unauthenticated remote code execution as root; full database and every tenant's JWT signing keys |
Affected | openIMIS before the 2026-10 release |
Fixed | 2026-10 release |
Severity | 10.0 CVSS 3.1 / 10.0 CVSS 4.0 (Critical) |
Disclosure | Coordinated with openIMIS / VulnCheck; fixed upstream |
Credit | CodeAnt AI Security |

A Report Preview Is Still Code Execution
openIMIS is an open-source health insurance management platform. Its report module lets staff design print layouts with ReportBro, a Python reporting library. A ReportBro report is a JSON document: a list of docElements, each a box of text or a table, plus styles and page settings. To make the designer feel live, the module ships a previewer that takes a report definition straight from the HTTP body and renders it to a PDF so the designer can see the result as they edit.
That rendering is not a passive paint. ReportBro elements support a printIf field, an expression that decides at render time whether the element appears, and the library evaluates it per element. openIMIS does not evaluate printIf with Python's eval; it uses simpleeval, a small library whose entire reason to exist is to evaluate untrusted expressions safely. So the design on paper is sound: untrusted expression, restricted evaluator, no raw eval in sight. The whole finding is about the gap between what simpleeval restricts and what this particular function table hands it.
The Endpoint With No Lock, and the Module That Was a Doorway
Two defects sit on the same request path, and either alone would be serious. Together they are a 10.
The first is missing authentication. The route is registered with a CSRF exemption and nothing else:
The view behind it carries one decorator, and it is not an auth decorator:
No login_required, no has_perms, no permission class. An anonymous HTTP request reaches the renderer.
The second defect is the sandbox escape. ReportBro builds the simpleeval evaluator with this function table:
Look at the asymmetry. decimal is narrowed to the Decimal class. datetime is the whole module. That matters because simpleeval's only structural guard against reaching dangerous names is a prefix blocklist:
simpleeval refuses any attribute whose name starts with _ or func_, which kills the classic __class__ / __globals__ / __builtins__ chain.
But the datetime module, like every imported Python module, carries a reference to the sys module under the plain attribute name sys. datetime.sys begins with neither forbidden prefix, so the blocklist waves it through. From sys the expression reads sys.modules, a dictionary of every module already imported into the process, and os is always one of them in a Django app. The full chain is datetime.sys.modules['os'].system(...), and not one link in it starts with an underscore. The guard is real, and it is looking at the wrong thing: it filters names, and the attacker never needs a forbidden name.
The Impact, Proven to a Marker
We placed a benign command in a printIf expression on a single text element and sent it to the previewer as an anonymous PUT:
ReportBro's schema validator requires every field on a docElement to be present, so a stripped-down element is silently rejected without evaluating anything. With a complete element the expression evaluates during render.
The preview response returns a temp-file handle rather than the command's output, so the output is read back through the same endpoint's separate unauthenticated file-read path, open(os.path.join(tempfile.gettempdir(), key)) at report/views.py:145, which accepts an arbitrary path. Requesting the marker file directly returned:
That is arbitrary command execution as root in the backend container, reached from an anonymous request. From there, /proc/self/environ yields the database and cache credentials, and the reachable data includes every insuree, policy, and claim, with ICD diagnosis codes tied to named patients, plus payroll and grievance records.
It also includes every user's JWT signing key, stored in tblUsers.PrivateKey, which a password reset does not invalidate. The honest ceiling here is not a ceiling at all: once code runs as root in the container, the confidentiality, integrity, and availability of everything the container touches is forfeit.
The Project Expected a Lock Here
The strongest evidence that this endpoint is not meant to be anonymous comes from the code around it, which treats report operations as privileged everywhere except this one function.
Signal in the codebase | Location | What it says |
|---|---|---|
The endpoint allow-lists a credential header |
| Its CORS policy adds |
The sibling view checks permissions |
|
|
The module defines 24 rights |
| Every other report operation is gated on one of 24 declared rights. This view is the sole outlier that reaches none of them. |
A project that forgets to authenticate an endpoint does not usually leave three fingerprints of the authentication it meant to apply. The Authorization header is allow-listed, the neighbor enforces rights, and the module carries a full rights catalog. The previewer is the one door in the building with the lock removed, and the frame still shows where the lock used to be.
Reach and Real-World Exposure
This does not depend on any deployment-specific exposure decision. The endpoint lives under /api/report/, the same URL prefix and the same web server as login, GraphQL, and every other endpoint the application must expose for anyone to use it at all. There is no separate port, feature flag, or operator toggle that puts this route online independently of the rest of the app. If an openIMIS instance is reachable by its own users, this endpoint is reachable identically, by anyone, with no credential.
We reproduced this on ghcr.io/openimis/openimis-be:develop, the standard published backend image. We did not survey how many internet-facing deployments exist, and we claim no population count. What we claim is narrower and worse: on any affected instance a user can log in to, the precondition for this exploit is already met, because the precondition is only network reach.
Severity
Metric | Value |
|---|---|
CVSS 3.1 | 10.0, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
CVSS 4.0 | 10.0, CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H |
Walk the metrics and nothing pulls the number down. The attack is over the network (AV:N). The complexity is low: a single crafted request, no race, no secret to guess, the expression is deterministic (AC:L, AT:N). It needs no privilege and no user interaction (PR:N, UI:N), because the endpoint is anonymous. Confidentiality, integrity, and availability are all High (C:H/I:H/A:H), because code running as root in the container can read, alter, or destroy anything it reaches.
The one metric worth defending is scope. This is S:C (Changed), and the CVSS 4.0 split confirms it with subsequent-system impact all High (SC:H/SI:H/SA:H). The vulnerable component is the simpleeval sandbox, whose entire job is to confine the expression to a safe set of values. The exploit breaks out of that security authority and into the host operating system and every tenant's data, including the JWT signing keys that let an attacker forge any user's session. That is the textbook definition of a scope change: the authority that was supposed to contain the impact is not the authority that suffers it. A sandbox escape to root is what S:C exists to describe, and with every impact at High and no privilege required, there is nothing left to cap the score below 10.0.
Detection and Fix
Upgrade. openIMIS fixed this in the 2026-10 release. The previewer routes were given permission checks, and the evaluator's function table was restricted so datetime resolves to datetime.datetime, the class, rather than the whole module. That is the durable remedy, and it closes both halves of the bug at once.
The code fix has two independent parts, and either one alone would have prevented root execution. Authenticate the endpoint, and its sibling reportbro_designer, gated on the module's existing report rights, the same rights the neighboring report() view already enforces. Separately, narrow the evaluator's function table to a class rather than a module. Passing any whole module into a name-blocklist sandbox exposes that module's entire import graph, because a module is a live reference to sys, to os through sys.modules, and to everything else the process has imported. The lesson generalizes past this one library: a prefix blocklist can only refuse names, so it is never a safe boundary when the objects behind the allowed names are modules.
If you cannot upgrade immediately, these reduce exposure but each has a cost, and the untested ones are reasoned from the code path, so validate before relying on them:
Block
/api/report/reportbro/previewand/api/report/reportbro/designerat the reverse proxy or WAF, or require authentication there. This closes the anonymous path but also disables the live report previewer for legitimate designers.Restrict network access to the backend so only the front end and trusted clients can reach
/api/report/. This narrows who can send the request but does not help against an attacker who already has any foothold on the network.
Disclosure Timeline
Date | Event |
|---|---|
2026-08-26 | CodeAnt AI Security Research reported seven openIMIS findings (two Critical, five High) to VulnCheck for coordinated vulnerability disclosure. |
2026-08-31 | VulnCheck confirmed receipt and opened coordination with the openIMIS maintainers. |
September 2026 | openIMIS acknowledged the reports; the next release was in its UAT phase. |
October 2026 | openIMIS published the 2026-10 release. |
2026-11-17 | openIMIS maintainers confirmed that the 2026-10 release addresses all reported findings, and CVE records were drafted. |
Credit and Scope
Finding | CodeAnt AI Security |
What we claim | The previewer evaluates an anonymous caller's |
What we do not claim | A count of internet-facing deployments; runtime verification on release lines other than |
Related | CVE-2026-82493, the stored (authenticated) variant of the same |
Coordination | Reported to openIMIS via VulnCheck; fixed in the 2026-10 release |
More from CodeAnt
CVE-2026-82493: The Stored Report That Ran as You, the Authenticated Twin of This Escape
CVE-2026-82491: The Export Field Path That Walked to the Signing Keys
CVE-2026-82490: The Dashboard Proxy That Authenticated Without Authorizing
Find out what is already exploitable in your codebase. Book a demo or start a free trial at codeant.ai.






