CVE-2026-100842: MONAI Package Eval Injection Vulnerability Leading to Code Execution
Summary
CVE-2026-100842: MONAI through 1.6.0 contains an eval injection vulnerability in _get_fake_spatial_shape() in monai/bundle/scripts.py. Affects monai versions < 1.6.1rc0. Fixed in 1.6.1rc0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
MONAI is an open-source framework designed for medical imaging applications, providing tools for deep learning and data processing. It facilitates the development of AI models in healthcare, allowing researchers and developers to build and deploy solutions efficiently. However, the package has a critical vulnerability that can be exploited if an attacker manipulates bundle metadata.
Vulnerability Detail
MONAI through version 1.6.0 contains an eval injection vulnerability in the _get_fake_spatial_shape() function located in monai/bundle/scripts.py. This function improperly validates shape expressions, allowing expressions built solely from constants and attribute, subscript, or call nodes to bypass the intended security checks. As a result, an attacker with the ability to influence a bundle's metadata can escape the eval sandbox and execute arbitrary code, leading to severe security implications.
How To Fix
Minimum fixed version
1.6.1rc0
This is the first release that contains the fix.
pip install --upgrade "monai==1.6.1rc0"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid using the affected function _get_fake_spatial_shape() with untrusted metadata. Ensure that any metadata used in your application is from a trusted source to mitigate the risk of exploitation.
Conclusion
The eval injection vulnerability in MONAI poses significant risks, allowing attackers to execute arbitrary code through manipulated metadata. It is crucial to update to the patched version to mitigate these risks and ensure the security of your applications.
See every vulnerability recorded for monai →
FAQ
The CVSS score of this vulnerability is 8.8, indicating a high severity level.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
If exploited, this vulnerability can lead to arbitrary code execution, allowing attackers to compromise the integrity and confidentiality of the system.
Yes, Vulert can monitor and alert you in real-time for open-source vulnerabilities in your software using just the Pipfile.lock.
If an immediate update is not possible, ensure that you do not use untrusted metadata with the affected function as a temporary measure.
References
Related vulnerabilities
Recent vulnerabilities recorded for monai.