CVE-2026-119578
Remote code execution via crafted algo_object.json in MONAI Auto3DSeg.
- CVSS 8.5
- CWE-470
- Input Validation and Sanitization
- Remote
MONAI from 1.6.0 before 1.6.1 contains a remote code execution vulnerability in Auto3DSeg algo_from_json() that allows attackers to run Python code via a crafted work directory's algo_object.json. Attackers can ship a malicious algorithm_templates module plus a _target_ name that is imported and instantiated when victims call AutoRunner or import_bundle_algo_history, executing code under default configuration.
- CWE
- CWE-470
- CVSS base score
- 8.5
- Published
- 2026-10-30
- OWASP
- A08 Software and Data Integrity Failures
- Orthogonal defect classification
- Algorithm
- Code defect classification
- Incorrect Algorithm
- Category
- Input Validation and Sanitization
- Subcategory
- Insecure Parsing or Deserialization
- Accessibility scope
- Remote
- Impact
- Arbitrary Code Execution
- Affected component
- MONAI
- Fixed by upgrading
- Yes
Solution
Upgrade MONAI to version 1.6.1 (or later) to remediate the remote code execution vulnerability in algo_from_json().
Vulnerable code sample
import json
import importlib
def algo_from_json(json_path: str):
"""
Load an algorithm object from a JSON file.
The JSON must contain a "_target_" field with the fully‑qualified class name.
"""
with open(json_path, "r") as f:
cfg = json.load(f)
# VULNERABLE: uses eval on untrusted input to import arbitrary class
target = eval(f"{cfg['_target_']}")
module_name, class_name = target.rsplit(".", 1)
module = importlib.import_module(module_name)
return getattr(module, class_name)(**cfg.get("params", {}))Patched code sample
import json
import importlib
# Allowed algorithm package prefix
_ALLOWED_PREFIX = "algorithm_templates."
def algo_from_json(json_path: str):
"""
Load an algorithm object from a JSON file.
The JSON must contain a "_target_" field with the fully‑qualified class name.
"""
with open(json_path, "r") as f:
cfg = json.load(f)
# FIX: validate target and avoid eval; restrict to trusted package
target = cfg["_target_"]
if not isinstance(target, str) or not target.startswith(_ALLOWED_PREFIX):
raise ValueError("Untrusted algorithm target")
module_name, class_name = target.rsplit(".", 1)
module = importlib.import_module(module_name)
return getattr(module, class_name)(**cfg.get("params", {}))Cite this entry
@misc{vaitp:cve2026119578,
title = {{Remote code execution via crafted algo_object.json in MONAI Auto3DSeg.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-119578},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-119578/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
