CVE-2026-100842
Received Received - Intake

Eval Injection in MONAI via Bundle Metadata

Vulnerability report for CVE-2026-100842, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-27

Last updated on: 2026-09-27

Assigner: VulnCheck

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-27
Last Modified
2026-09-27
Generated
2026-09-27
AI Q&A
2026-09-27
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
monai monai to 1.6.0 (inc)
project_monai monai to 1.6.0 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-95 The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. "eval").

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is an eval injection flaw in MONAI through version 1.6.0. The _get_fake_spatial_shape() function in monai/bundle/scripts.py attempts to validate shape expressions by checking AST nodes but fails to block expressions composed solely of constants and attribute chains. Attackers can bypass the allowlist filter using malicious Python expressions like (1).__class__.__bases__[0].__subclasses__() which contain no prohibited ast.Name nodes. These expressions then bypass the eval sandbox and lead to code execution.

The vulnerability is exploitable in non-default flows where an attacker can influence a bundle's metadata, enabling code execution through the 'verify_net_in_out' CLI flow.

Detection Guidance

Check if MONAI version 1.6.0 or earlier is installed by running: pip show monai. If installed, inspect bundle metadata files for suspicious shape expressions containing attribute chains like (1).__class__.__bases__[0].__subclasses__().

Review logs for CLI flows invoking 'verify_net_in_out' with unexpected parameters. Use static analysis tools to scan monai/bundle/scripts.py for eval() usage with shape parameters.

Impact Analysis

If you use MONAI through version 1.6.0 and rely on the 'verify_net_in_out' CLI flow, an attacker who can influence your bundle's metadata could execute arbitrary code on your system. This could lead to data theft, system compromise, or further network intrusions depending on your environment.

Compliance Impact

This vulnerability could lead to unauthorized code execution, potentially resulting in data breaches. For GDPR, this may violate principles of data protection and lead to regulatory penalties. For HIPAA, unauthorized access to protected health information could result in severe compliance violations and fines.

Mitigation Strategies

Upgrade MONAI to a patched version beyond 1.6.0 immediately. If unable to upgrade, replace the vulnerable _get_fake_spatial_shape() function with a version using ast.literal_eval for strict validation.

Restrict write access to bundle metadata files to prevent unauthorized modifications. Monitor systems for unusual activity linked to 'verify_net_in_out' CLI flows.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-100842. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart