Skip to content

openIMIS wave (7 GHSAs): report preview eval hands root, ORM paths mint admin JWTs

Wave in one line: one health-insurance platform shipped a server-side expression evaluator wired to two attacker-reachable paths (unauthenticated report preview, stored report definitions), an ORM filter that trusts caller-dotted relation paths all the way into the admin JWT signing key, and three authorization checks that only look like checks (login-not-right proxy gate, unscoped notification fan-out, vacuously-true empty permission list).

Source: GitHub Security Advisories, coordinated publication 2026-11-25T15:31Z, all seven legs in one CNA-style release against openIMIS before 2026-10. openIMIS is a widely deployed social-health-insurance information system (national deployments across Africa and Asia), typically internet-exposed Django/Laravel stacks with GraphQL APIs, an OpenSearch reporting tier, and a FHIR R4 module. The advisory text is unusually specific about sinks and endpoints, so the legs below are directly replayable in a lab.

Advisories on this page: GHSA-69fj-g6j2-4qrq / CVE-2026-82489 (critical, unauth reportbro preview RCE + file read), GHSA-3xfj-hvgj-8jq9 / CVE-2026-82493 (high, stored report RCE), GHSA-jxrf-4qgm-qf8p / CVE-2026-82492 (high, dedup path validation first-segment-only), GHSA-22mc-36fc-93j7 / CVE-2026-82491 (high, export mixin dotted-path traversal), GHSA-j26r-49hv-q4fm / CVE-2026-82490 (high, OpenSearch proxy hardcoded admin credential), GHSA-5m8p-9wfm-9vgm / CVE-2026-82494 (high, FHIR subscription no row-level scope), GHSA-w754-c839-x3gc / CVE-2026-82495 (high, empty-permissions-list vacuous DELETE).

Advisories covered

Unauthenticated root RCE and file read on /api/report/reportbro/preview (CVE-2026-82489 / GHSA-69fj-g6j2-4qrq, critical)

The report module (openimis-be-report_py) evaluates printIf expressions from the preview request server-side using simpleeval with an insufficient name-prefix blocklist. An unauthenticated attacker crafts an expression that walks datetime.sys into sys.modules['os'] and reaches os.system, executing arbitrary commands as root. The same endpoint's key parameter additionally yields unauthenticated arbitrary file read, enabling database credential and JWT signing key exposure. Two boundaries crossed on one route: unvalidated expression material into a Python evaluator, and a caller-chosen identifier into a file resolution path.

Stored report RCE: save as a low-priv report editor, detonate when any admin views (CVE-2026-82493 / GHSA-3xfj-hvgj-8jq9, high)

The overrideReport GraphQL mutation stores submitted report definitions without validation, and rendering evaluates printIf with the same simpleeval evaluator. A caller holding only report add/edit/query privileges plants the same datetime.sys-class payload; it executes as root whenever any viewer renders the report, including administrators and scheduled jobs. Write and trigger are separate users, which makes this the stored-RCE variant of the leg above and gives it a persistence angle (scheduled report jobs re-run the payload).

Dotted ORM relation paths: one right becomes the admin JWT signing key (CVE-2026-82492 / GHSA-jxrf-4qgm-qf8p, high)

Two sibling legs share one defect: caller-supplied dotted column paths are rewritten into Django ORM lookup syntax (__) without an allow-list, and validation (where it exists) checks only the first segment of the dotted path before the full unvalidated string enters the query.

  • Deduplication service (openimis-be-deduplication_py, deduplication/services.py): a caller holding only the narrow right 170001 supplies a crafted path such as user_created__i_user__private_key to traverse relations and retrieve an administrator's JWT signing key.
  • Core export mixin (openimis-be-core_py, core/gql/export_mixin.py): a single ordinary read right is enough to traverse arbitrary foreign-key relations with the same shape.

With the signing key, the attacker forges valid administrator sessions without a password, surviving password resets, and generating no failed-login events. See also GHSA-22mc-36fc-93j7 / CVE-2026-82491 for the export-mixin leg.

Proxy that checks login but not right, then attaches a hardcoded admin credential (CVE-2026-82490 / GHSA-j26r-49hv-q4fm, high)

The OpenSearch reporting dashboard proxy has three stacked failures: nginx auth_request verifies only that the caller is logged in (the declared right is never checked), the proxy then attaches a hardcoded administrative credential to the forwarded request, and the backend OpenSearch cluster runs with its security plugin disabled via a hardcoded compose setting. Any authenticated account, including self-registered or zero-rights users, gets read, write, and delete on the whole cluster.

FHIR subscriptions with no row-level security, pushed anywhere (CVE-2026-82494 / GHSA-5m8p-9wfm-9vgm, high)

The FHIR R4 module (openimis-be-api_fhir_r4_py) delivers subscription notifications with no row-level checks on the notification path: no has_perms, no get_queryset, no ROW_SECURITY, no district or health-facility scoping. A limited district-level account registers a standing FHIR subscription and continuously receives claim data outside its scope, and notification pushes can be directed to internal network addresses (an SSRF leg on the delivery side).

Empty permission list grants everything (CVE-2026-82495 / GHSA-w754-c839-x3gc, high)

user.has_perms([]) is vacuously true, and the Coverage delete permission list shipped empty, so any authenticated attacker can DELETE /Coverage/<uuid>/ and permanently remove insurance policy records. An empty allow-list read as "no permission required" instead of "nobody allowed" is the classic vacuous-truth gate.

Operator rules

  1. On Django-family APIs, fuzz dotted relation paths as a first-class input class. Any query/export/filter parameter whose value lands in ORM lookup syntax accepts field__rel__rel__column shapes; the validator, if present, routinely checks only segment one. Battery: __ chains from the base model through FK relations ending at secret-bearing columns (private_key, token, hash, secret). A hit that returns any value from a joined table is the finding (same field-name-becomes-query-grammar family as the Sept 18 query-grammar page and the Sept 21 export-column re-entry legs).
  2. Find the evaluator before you find the injection. For report/designer/preview features, grep the app (or the vendor docs/deps) for simpleeval, eval, asteval, RestrictedPython, then reach it through every field whose value is later evaluated: printIf, visibility conditions, templates, formulas. Blocklists keyed on name prefixes die to module attribute walking (datetime.sys, __class__ chains); the proof is one marker command in a lab instance, never on production.
  3. Score stored-eval payloads on the render side, not the save side. Save-time acceptance proves nothing; detonation happens when a different principal (admin viewer, scheduled job) renders. Enumerate every render entry point (preview endpoint, viewer page, cron report job, export) as a separate trigger for the same stored payload.
  4. An auth_request that only checks "is logged in" is an authentication gate wearing an authorization badge. On any reverse-proxied dashboard, diff the (route x right x role) matrix with a zero-rights or self-registered account. Then read the deployment files: a proxy injecting a fixed upstream credential plus a compose/helm flag disabling the backend's own security layer means the proxy is the only wall, and the credential is in the image.
  5. Grep for empty permission lists. has_perms([]), require_permissions([]), permissions_delete = []: empty-list-meets-vacuous-truth is a one-request privilege check on any route whose permission list was emptied when a feature was trimmed. Test DELETE especially, since read/write lists get attention and delete lists rot.
  6. Notification fan-out is a data-exfil and SSRF channel. Subscription/webhook delivery paths frequently skip the row-level checks the read path has. Register a subscription with your lab account, watch whether out-of-scope records arrive, and test whether the delivery URL accepts internal addresses (owned internal canary only).

Validation boundaries

  • Disposable openIMIS lab instance (docker compose) only; use synthetic members, claims, and coverage records you created.
  • Prove RCE legs with marker files (touch /tmp/openimis-marker) and prove key exposure with a rotated/synthetic private_key, never a production JWT signing key; never forge sessions against live deployments.
  • OpenSearch and FHIR proofs on your own cluster and your own callbacks; no metadata endpoints, no real claim data, no destructive DELETE outside scratch rows.
  • Sept 18 query-grammar page: LimeSurvey export-column SQL re-entry (same persisted/parameterized name re-entering a query grammar).
  • Oct 21 Trigger.dev wave page: default secrets and tenant lookup drift (same authz-gate-drift family).
  • May 13 template/render batch: expression and template fields crossing into executable contexts.
  • Nov 23 MCP/parser wave: option/operand strings reaching interpreter and argv sinks (caller-shape trust, evaluator-side sibling).