PT-2026-105778 · Pypi · Monai

Published

2026-09-27

·

Updated

2026-09-27

CVSS v3.1

8.8

High

VectorAV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
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.

Fix

Found an issue in the description? Have something to add? Feel free to write us 👾

Related Identifiers

PYSEC-2026-4017

Affected Products

Monai