Skip to content

CVE-2026-100842 MONAI through 1.6.0 _get_fake_spatial_shape eval() Sandbox Bypass via Attribute Chains

HighCVSS 7.3 EPSS 0.18%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: total

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.

Upgrade path

3 packages: 3 fixed.

PackageAffectedFixed inStatus
Project-MONAI MONAI <= 1.6.0 after 1.6.0 Fixed
pypi monai <= 1.6.0 after 1.6.0 Fixed
pypi monai(PyPI) < 1.6.1rc0; = 0.0.1; = 0.1.0; = 0.2.0 +41 more 1.6.1rc0 Fixed

Affected products

ProductAffected versionsFixed in
pypi monai(PyPI) < 1.6.1rc0 1.6.1rc0
pypi monai(PyPI) = 0.0.1 No fix listed
pypi monai(PyPI) = 0.1.0 No fix listed
pypi monai(PyPI) = 0.2.0 No fix listed
pypi monai(PyPI) = 0.3.0 No fix listed
pypi monai(PyPI) = 0.4.0 No fix listed
pypi monai(PyPI) = 0.5.0 No fix listed
pypi monai(PyPI) = 0.5.1 No fix listed
pypi monai(PyPI) = 0.5.2 No fix listed
pypi monai(PyPI) = 0.5.3 No fix listed
pypi monai(PyPI) = 0.6.0 No fix listed
pypi monai(PyPI) = 0.7.0 No fix listed
pypi monai(PyPI) = 0.8.0 No fix listed
pypi monai(PyPI) = 0.8.1 No fix listed
pypi monai(PyPI) = 0.9.0 No fix listed
pypi monai(PyPI) = 0.9.1 No fix listed
pypi monai(PyPI) = 1.0.0 No fix listed
pypi monai(PyPI) = 1.0.1 No fix listed
pypi monai(PyPI) = 1.1.0 No fix listed
pypi monai(PyPI) = 1.2.0 No fix listed
pypi monai(PyPI) = 1.3.0 No fix listed
pypi monai(PyPI) = 1.3.1 No fix listed
pypi monai(PyPI) = 1.3.2 No fix listed
pypi monai(PyPI) = 1.3.2rc1 No fix listed
pypi monai(PyPI) = 1.3.3rc1 No fix listed
Show 22 more
ProductAffected versionsFixed in
pypi monai(PyPI) = 1.4.0 No fix listed
pypi monai(PyPI) = 1.4.0rc1 No fix listed
pypi monai(PyPI) = 1.4.0rc10 No fix listed
pypi monai(PyPI) = 1.4.0rc11 No fix listed
pypi monai(PyPI) = 1.4.0rc12 No fix listed
pypi monai(PyPI) = 1.4.0rc2 No fix listed
pypi monai(PyPI) = 1.4.0rc3 No fix listed
pypi monai(PyPI) = 1.4.0rc4 No fix listed
pypi monai(PyPI) = 1.4.0rc5 No fix listed
pypi monai(PyPI) = 1.4.0rc6 No fix listed
pypi monai(PyPI) = 1.4.0rc7 No fix listed
pypi monai(PyPI) = 1.4.0rc8 No fix listed
pypi monai(PyPI) = 1.4.0rc9 No fix listed
pypi monai(PyPI) = 1.4.1rc1 No fix listed
pypi monai(PyPI) = 1.5.0 No fix listed
pypi monai(PyPI) = 1.5.0rc1 No fix listed
pypi monai(PyPI) = 1.5.1 No fix listed
pypi monai(PyPI) = 1.5.2 No fix listed
pypi monai(PyPI) = 1.5.2rc1 No fix listed
pypi monai(PyPI) = 1.6.0 No fix listed
pypi monai <= 1.6.0 No fix listed
Project-MONAI MONAI <= 1.6.0 No fix listed

References