Skip to main content

MONAI CVE-2026-100842

| EUVDEUVD-2026-87846 HIGH
Eval Injection (CWE-95)
2026-09-27 VulnCheck GHSA-j335-cfj5-2fw8
7.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft bundle metadata with introspection-chain shape expression
  2. Delivery
    Deliver malicious bundle to target
  3. Exploit
    Victim runs verify_net_in_out CLI flow
  4. Execution
    eval bypasses AST name allowlist
  5. Impact
    Achieve arbitrary code execution in victim context

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Eval input sanitization
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires the MONAI bundle 'verify_net_in_out' CLI verification flow, which the advisory describes as a non-default flow, and the attacker must be able to influence a bundle's metadata (the spatial-shape value consumed by _get_real_input_data/verify_net_in_out) - e.g. via a malicious or tampered third-party bundle that the victim verifies. The payload must be a shape expression composed only of constants and attribute/subscript/call AST nodes (no ast.Name), such as "(1).__class__.__bases__[0].__subclasses__()", to slip past the name allowlist. Limiting factors: local attack vector (AV:L), high attack complexity (AC:H) with a specific attack requirement (AT:P), low-but-present privilege requirement (PR:L), and dependence on a non-default verification workflow - so default MONAI usage that never runs verify_net_in_out on untrusted bundles is not exposed.

Impact

This is a genuine RCE (CWE-95 eval injection) but with meaningful real-world constraints that keep it below its 7.3 headline. The vendor CVSS 4.0 vector (AV:L/AC:H/AT:P/PR:L/UI:N) tells the real story: local attack vector, high attack complexity, a specific attack requirement (AT:P), and low privileges required. It is NOT a remote-unauthenticated drive-by. Exploitation is gated on the non-default 'verify_net_in_out' bundle CLI flow and on the attacker being able to influence a bundle's metadata that a victim then verifies - a supply-chain-style precondition rather than a direct network exploit. No EPSS score, no CISA KEV listing, and no public POC were provided in the intelligence, so there is no public exploit identified at time of analysis and no evidence of active exploitation. The signals are internally consistent (local, complex, conditional), so there is no CVSS-vs-description conflict here - this reads as a real-but-conditional bug appropriate for prioritized patching in MONAI-based ML pipelines rather than an emergency. Note the vector is CVSS 4.0 only; no 3.1 vector was supplied by the source.

Exploit ScenarioDerived

An attacker publishes or tampers with a MONAI bundle so its metadata contains a spatial-shape expression like "(1).__class__.__bases__[0].__subclasses__()" - pure constant/attribute/subscript/call nodes with no ast.Name, which the AST allowlist fails to catch. A data scientist or CI pipeline runs the bundle 'verify_net_in_out' flow on that bundle, causing eval() to execute the introspection chain and run attacker code in the victim's process. No public POC is referenced, but the description supplies working bypass gadget strings; exploitation is local and high-complexity per the CVSS vector.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 27, 2026

MONAI through 1.6.0 lets a user who can supply or tamper with a bundle's metadata achieve code execution by abusing an eval()-based sandbox in _get_fake_spatial_shape() (monai/bundle/scripts.py). The vulnerable function screens shape expressions with a helper that walks the AST and only rejects ast.Name nodes outside the 'p'/'n' allowlist, so payloads assembled purely from constants and attribute, subscript, or call nodes - such as "(1).__class__.__bases__[0].__subclasses__()" - pass validation and then reach eval(), enabling object-introspection chains that escape to arbitrary code execution. The path is reachable through the non-default bundle 'verify_net_in_out' CLI verification flow (_get_real_input_data / verify_net_in_out), so exploitation is limited to authenticated local users (CVSS:3.1/AV:L/AC:H/PR:L/UI:N, CVA:H) who run that verification on an untrusted or modified bundle; default MONAI workflows that never verify untrusted bundles are not exposed, and no public exploit code was identified at time of analysis.

RemediationAI

No vendor-released patch version is identified in the available data; track the GitHub security advisory (https://github.com/Project-MONAI/MONAI/security/advisories/GHSA-h89g-r5pc-wxfm) for a fixed release and upgrade MONAI as soon as one is published. Until then, the most effective control is to stop running the bundle 'verify_net_in_out' CLI verification flow against bundles you did not create and did not cryptographically verify - this fully closes the eval path at the cost of losing shape verification for third-party bundles, so verify provenance (hash/signature, trusted registry) before treating a bundle as safe. If the flow is required, run it inside a disposable container or sandbox with no network access, a read-only filesystem, and no credentials or mounts, accepting that a successful payload would then only compromise the throwaway environment. Where feasible, patch or monkey-patch _get_fake_spatial_shape() to evaluate shape expressions with ast.literal_eval or a strict numeric-expression parser instead of eval(), and replace the ast.Name-only allowlist with a full AST whitelist that rejects Attribute, Subscript, Call, and Lambda nodes; the trade-off is that legitimate bundles whose metadata uses those node types for computed shapes may fail validation. Detection can focus on bundled metadata containing '__class__', '__bases__', '__subclasses__', '__globals__', or similar introspection strings, and on audit logs of verify_net_in_out invocations against externally sourced bundles.

Affected VersionsENISA

MONAI 0 ≤1.6.0

Affected Packages

pypi monai fix: 1.6.1rc0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

MONAI is a PyTorch-based open-source framework for medical imaging deep learning, and its 'bundles' are portable model packages whose JSON/Python metadata describes network configuration, including spatial input shapes. CVE-2026-100842 is a CWE-95 (Improper Neutralization of Directives in Dynamically Evaluated Code / 'Eval Injection') flaw in _get_fake_spatial_shape() within monai/bundle/scripts.py. Rather than parsing shape expressions with a safe evaluator such as ast.literal_eval, the code first runs an allowlist check that walks the AST and collects only ast.Name nodes, rejecting any identifier other than 'p' or 'n', then hands the raw string to eval(). Because the AST walk is blind to every other node type, an expression containing no ast.Name nodes at all - for example "(1).__class__.__bases__[0].__subclasses__()" or "int.__class__.__init__.__globals__" - satisfies the check and is evaluated, allowing Python object-introspection chains to reach classes and globals and ultimately execute attacker-chosen code. The tainted shape value originates from bundle metadata and is consumed by _get_real_input_data and verify_net_in_out, making the bundle 'verify_net_in_out' CLI verification flow the delivery path. The CPE cpe:2.3:a:project-monai:monai:*:*:*:*:*:*:*:* (all releases through 1.6.0) confirms the entire product line is in scope up to the stated ceiling, and the reported 7.3 figure is a CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H score that the independent CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H assessment mirrors: high confidentiality, integrity and availability impact on the vulnerable component, but gated behind a local vector, high complexity, and a specific attack requirement.

Know when Monai gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 7.3 HIGH
CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.0 HIGH

Local/config-and-bundle-dependent flow (AV:L), introspection-chain bypass in a non-default path is complex (AC:H), some access to supply/verify bundle metadata (PR:L); successful eval escape yields full code execution (C/I/A:H).

3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
High
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

MONAI through 1.6.0 contains an eval injection vulnerability in _get_fake_spatial_shape() in monai/bundle/scripts.py. The function validates shape expressions with a helper that walks the AST and only collects ast.Name nodes, rejecting any name other than 'p' or 'n', before passing the string to eval(). Expressions built solely from constants and attribute, subscript, or call nodes (for example "(1).__class__.__bases__[0].__subclasses__()" or "int.__class__.__init__.__globals__") contain no ast.Name nodes and therefore bypass the allowlist. Because the shape value originates from bundle metadata consumed by _get_real_input_data and verify_net_in_out (reachable through the bundle 'verify_net_in_out' CLI flow), an attacker who can influence a bundle's metadata can escape the eval sandbox via object introspection chains and achieve code execution in this non-default flow.

Technical POC Analysis

CWE-95 (Eval Injection).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

MONAI through 1.6.0 contains a high-severity code execution weakness that affects organizations using the non-default bundle verification CLI to inspect untrusted or modified model bundles. The exposure is limited to authenticated local users who run the verify_net_in_out workflow, so the primary risk is to teams that allow third-party or tampered bundles into trusted AI and medical-imaging pipelines rather than to all MONAI deployments. Leadership should care because successful exploitation could let a local user compromise the host running MONAI, potentially affecting sensitive imaging data and model integrity.

Business Impact: Medium
Compensating Controls

No vendor-released patch identified; disable or restrict verify_net_in_out for untrusted bundles, require signed or trusted bundle sources, validate bundle metadata and checksums, run verification in low-privilege isolated containers, and monitor bundle-handling activity until a vendor fix is available.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Medium
widely used PyTorch medical-imaging DL framework, but niche healthcare/research domain
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Defer
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
Medium
Technical Impact
Total

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy