CVE-2026-145610: MONAI before 1.6.2 Code Execution via algo_from_json State Expressions
MONAI before 1.6.2 contains a code injection vulnerability in monai.auto3dseg.utils.algofromjson(), which copies state.templatepath from an algo JSON file into a ConfigParser that evaluates '$' expressions with eval(). Attackers can supply a crafted algoobject.json with a legitimate BundleAlgo target to bypass the Algo subclass check and execute arbitrary Python code when it is loaded.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.6.2
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications using MONAI before 1.6.2 are exposed when they load an attacker-supplied or otherwise untrusted algo JSON file through monai.auto3dseg.utils.algo_from_json().
What does an attacker need to exploit it?
The attacker needs to cause a crafted algo_object.json to be loaded. The file must use a legitimate BundleAlgo _target_ to pass the Algo subclass check, then can place a malicious expression in _state_.template_path.
Is user interaction required?
Yes. The supplied vector indicates user interaction is required, consistent with a user or application workflow loading the crafted JSON file.
What should be done if immediate patching is not possible?
Do not load algo JSON files from untrusted sources. Restrict accepted files to trusted, validated artifacts and prevent untrusted users or processes from replacing algo_object.json files.
How can I determine whether an environment is affected?
Check whether the installed MONAI version is earlier than 1.6.2 and whether the environment uses algo_from_json() to load algo JSON files. Environments that do not load untrusted algo JSON input are not exposed through the described attack path.