openIMIS lets a non-administrative user customise a report's layout and save it. CVE-2026-82493 is the discovery that the saved layout is never validated before it is rendered, and that rendering runs the same escapable expression sandbox that already leaked root on the unauthenticated preview endpoint. A user holding only ordinary report-editing rights stores one crafted definition, walks away, and the code fires later as root under somebody else's session: an administrator opening the report, or a scheduled job printing it unattended. The payload lives in the database, so a fix to any single request-time door never reaches it.

TL;DR
The defect. The
overrideReportmutation takes anameand adefinitionstring and writes the definition to the database verbatim, with no validation, then renders it through an expression sandbox that is escapable (report/schema.py:76-99,report/views.py:22-45).What it grants. Arbitrary command execution as the server process (root, in the stock container), reached from an account holding only report add, edit, and query rights. No administrative privilege is needed to plant it.
The tell. Storing and customising report definitions is an intentional feature. The flaw is that the stored definition is trusted at render time, and no test ever exercises a
printIfbeyond a trivial boolean.Reach. Stock backend code in
openimis-be-report_py. The payload persists across restarts and redeploys and fires under an arbitrary future caller's session.Status. Reproduced on
ghcr.io/openimis/openimis-be:developto the markeruid=0(root). Fixed in the openIMIS 2026-10 release.
At a Glance
CVE | CVE-2026-82493 |
Product | openIMIS backend, report module ( |
Class | CWE-94, Code Injection (with CWE-269, Improper Privilege Management) |
Root cause | A stored report definition is written and later rendered without validation, through an escapable simpleeval/reportbro sandbox |
Impact | Stored, authenticated remote code execution as root, triggered under a later caller's session |
Affected | openIMIS before the 2026-10 release |
Fixed | 2026-10 release |
Severity | 8.8 CVSS 3.1 / 8.7 CVSS 4.0 (High) |
Disclosure | Coordinated with openIMIS and VulnCheck; fixed upstream |
Credit | CodeAnt AI Security |

A Feature That Stores Code
openIMIS is a Django application for running health-insurance schemes, and its report module lets operators tailor what a printed report looks like. The layouts are ReportBro documents: a JSON structure of elements, each of which can carry a printIf expression that decides whether the element appears. That expression language is the point of the feature. A real report needs to say "show this block only when the claim total is over a threshold," and printIf is where that logic lives.
So the module accepts, stores, and evaluates user-authored expressions by design. That is not the bug. The bug is what the module does not do between accepting the expression and evaluating it, and whose privileges it runs with.
The Mutation That Trusts the String
The entry point is a GraphQL mutation. Its input is two strings:
The handler takes those fields and writes them straight onto the stored model:
There is no schema check on definition, no allowlist of element types, no inspection of the printIf expressions it carries. Whatever JSON the caller submits becomes the stored report, verbatim. The setattr loop is the whole write path: it copies submitted keys onto the model and saves. The definition that comes back out at render time is byte-for-byte the one the caller sent.
One note on timing. This mutation runs through openIMIS's asynchronous mutation pipeline (core/tasks.py, openimis_mutation_async, dispatched via Celery). The call returns an internalId immediately, before the write has necessarily landed. On a deployment whose Celery worker is not running, the mutation acknowledges but the definition is not yet stored. Where the worker runs normally, the write lands and the stored definition is live for the next render.
Where the String Becomes Root
An unvalidated string is only dangerous if something later trusts it. The report view does:
generate_report hands the stored definition to ReportBro, which evaluates each element's printIf through a simpleeval-based evaluator. That evaluator is the same sandbox that CVE-2026-82489 escaped on the unauthenticated preview endpoint, and it is escapable for the same two reasons.
First, the function table handed to the evaluator exposes the whole datetime module, not a single narrowed class:
Second, simpleeval's attribute guard is a name-prefix check only. It blocks attribute names that start with an underscore and nothing else:
A module object carries a sys attribute that does not start with an underscore. So datetime.sys passes the guard, and datetime.sys.modules['os'].system('...') reaches a shell. The expression is a valid printIf, the evaluator runs it, and the command executes with the privileges of the report-rendering process. In the stock container that process is root.
The Impact, Proven
In the lab we authenticated as an account holding only report rights (131200 query, 131224 add, 131225 edit) plus the view right for one report. No administrative right. We then called overrideReport on a report that account could view, with a printIf of:
The payload is now stored. The account that planted it never triggered it. A different viewer did, by doing nothing unusual:
Observed: 200. The marker read back:
An account with no administrative privilege planted code, and that code executed as root when a different user requested the report in the ordinary course of using the product. The honest ceiling is the ceiling of command execution as the server user: full control of the backend process, its database credentials, its signing keys, and anything else root can reach inside that container.
The Negative Control: One Trivial Test
The sharpest credibility beat on this bug is not a refused request, it is an absence. The report module has tests. None of them exercises a printIf beyond a trivial boolean literal. The feature's own test suite confirms that an element either prints or does not, and never asks what the expression language can reach when the expression comes from a caller rather than a developer writing a fixture.
What is exercised |
| What it proves |
|---|---|---|
The shipped tests | a constant such as | an element prints or is hidden |
This finding |
| the same evaluator runs arbitrary commands |
The gap between those two rows is the vulnerability. The code treats printIf as a presentation toggle. The evaluator treats it as a program. Nothing in between asserts that a stored, caller-supplied expression stays a toggle.
How This Differs From Its Unauthenticated Twin
CVE-2026-82489 is the unauthenticated sibling: the same sandbox escape reached through the report previewer, with no login at all. The escape primitive is identical, and both were fixed together in the 2026-10 release. Two things make this one its own CVE.
It is authenticated. Planting the payload requires report-editing rights, which is why this scores PR:L and the preview bug PR:N.
It is stored, and that is the whole story. The preview bug is a request-time exploit: the attacker sends the expression and it runs in that same request. Close the preview door and the preview bug is gone. This one is different. The expression lives in the database. It survives restarts, it survives redeploys, and it survives a fix to any single request-time entry point that is not the render path itself. And it does not fire under the attacker's session at all. It fires under whoever next requests the report, in practice an administrator opening it or a scheduled job printing it on a cron. The attacker plants once and lets the product's normal operation pull the trigger, with no indication to the victim that the report they just opened ran a command as root.
Severity
Metric | Value |
|---|---|
CVSS 3.1 | 8.8, CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
CVSS 4.0 | 8.7, CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
Network reachable, low complexity, no user interaction. The one privilege required is an account with report-editing rights (PR:L), and the resulting code execution is total: confidentiality, integrity, and availability are all High, because a shell as root reads, rewrites, and destroys at will.
It is worth being exact about why this scores 8.8 while its unauthenticated twin, CVE-2026-82489, scores 10.0, because the code execution is identical in both. Two metrics differ, and only those two. The twin is PR:N: it needs no account, this one needs report-editing rights, which drops PR from None to Low. The twin is S:C: its escape is scored crossing from the application into the host as a separate security authority, a scope change, while this authenticated variant is scored S:U. Privilege-required and scope are the entire gap between a 10.0 and an 8.8 here. The command that runs, and the root it runs as, are the same.
Detection and Fix
Upgrade. openIMIS fixed this in the 2026-10 release. That is the durable remedy, and it is the same fix that closes the unauthenticated preview variant.
Narrow the evaluator at the source. The root-cause fix is to restrict the ReportBro function table so that datetime is bound to datetime.datetime, the class, rather than to the datetime module. A class does not carry a sys attribute, so datetime.sys.modules['os'] has nothing to resolve, and the escape is dead on every path that uses the evaluator, request-time and stored alike. Fixing the sink once is why a single release closes both CVEs.
Treat report-definition edits as privileged and audited. Independently of the sandbox fix, a stored definition that becomes executable at render time should not be a quiet, self-service write. Log who changed which definition, and consider requiring a second approval before a changed definition goes live.
If you cannot upgrade immediately, these reduce exposure but each has a cost, and they reason from the code path rather than a tested control:
Revoke report add and edit rights (
131224,131225) from every account that does not strictly need to author layouts. A single holdout editor account is enough to plant the payload.Do not rely on taking the preview endpoint offline. It stops the unauthenticated twin, not this one: the stored payload fires from the authenticated render path and from scheduled jobs, which remain live.
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 | A stored report definition is rendered without validation through an escapable evaluator; demonstrated root command execution from report-editing rights, reproduced to the marker |
What we do not claim | Any measurement of real-world prevalence; that a backend run as a non-root user yields root (the escape still yields code execution, as that user); that a worker-less deployment stores the payload (the async pipeline must land the write) |
Related | CVE-2026-82489, the unauthenticated twin of the identical sandbox escape, fixed in the same release |
Coordination | Reported to openIMIS, coordinated with VulnCheck as assigning CNA; fixed in the 2026-10 release |
More from CodeAnt
CVE-2026-82489: The Report Preview That Ran Shell Commands Before You Logged In, the unauthenticated twin of this exact escape.
CVE-2026-82490: The Dashboard Proxy That Authenticated Everyone and Authorized No One.
CVE-2026-82491: The Export Field Path That Walked to the Signing Keys.
Find out what is already exploitable in your codebase. Book a demo or start a free trial at codeant.ai.






