CVE-2026-145609 in MONAI
Summary
by MITRE • 12/06/2026
MONAI before 1.6.2 contains an unsafe class loading vulnerability in nnunet_bundle.py that allows attackers to invoke arbitrary callables via an attacker-controlled plans.json network_class_name. Attackers can distribute a malicious nnUNet bundle whose class name is resolved by pydoc.locate, overwriting arbitrary files and potentially achieving code execution.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 12/06/2026
The vulnerability identified in MONAI versions prior to 1.6.2 represents a critical insecure deserialization flaw located within the nnunet_bundle.py module. This security issue stems from the framework's reliance on pydoc.locate to resolve class names specified in an attacker-controlled plans.json configuration file, specifically through the network_class_name parameter. In machine learning workflows involving medical imaging data processing, models are often packaged into bundles that include metadata and configuration files to define how neural networks should be instantiated and executed. When MONAI processes these bundles, it dynamically loads classes based on string identifiers provided in the JSON structure without sufficient validation or sanitization of those inputs. This design choice creates a direct path for remote code execution if an adversary can influence the contents of the plans.json file distributed within a model bundle.
From a technical perspective, pydoc.locate is designed to resolve dotted names into Python objects by importing modules and accessing attributes dynamically. While this functionality is useful for flexible plugin architectures, it becomes dangerous when applied to untrusted input data. An attacker can craft a malicious nnUNet bundle where the network_class_name field points not to a legitimate neural network class, but to an arbitrary callable or object within any installed Python package that has side effects upon instantiation or attribute access. By leveraging this mechanism, the vulnerability allows for arbitrary code execution because the dynamic loading process effectively bypasses standard security controls that would normally restrict which classes can be instantiated. The attacker does not need direct shell access; instead, they exploit the trust MONAI places in the configuration files associated with model bundles to trigger malicious behavior during the model initialization phase.
The operational impact of this vulnerability is severe, as it compromises the integrity and confidentiality of systems running affected versions of MONAI. Since medical imaging applications often handle sensitive patient data, successful exploitation could lead to unauthorized access to private health information or manipulation of diagnostic results. Furthermore, because pydoc.locate can resolve classes that perform file system operations, an attacker might overwrite critical application files, install backdoors, or pivot further into the host network. This aligns with CWE-502, which describes deserialization of untrusted data as a weakness where objects are reconstructed from external input without proper validation. The attack vector also corresponds to MITRE ATT&CK technique T1059, specifically Command and Scripting Interpreter sub-techniques, as the vulnerability enables the execution of arbitrary commands through Python code injection via configuration files rather than direct command-line arguments or script uploads.
Mitigation strategies must focus on restricting dynamic class loading mechanisms within MONAI environments. The primary remediation is to upgrade immediately to version 1.6.2 or later, where this insecure deserialization path has been addressed by the development team through stricter input validation and safer instantiation patterns that do not rely solely on pydoc.locate for untrusted inputs. For organizations unable to patch immediately, implementing a allowlist of permitted class names in plans.json files can provide temporary protection against arbitrary callable invocation. Additionally, running MONAI workloads within isolated containers or sandboxed environments with restricted file system permissions can limit the blast radius if an exploitation attempt occurs. Security teams should also audit existing model bundles for any anomalies in configuration files and enforce strict provenance checks to ensure that only trusted sources are used when loading neural network models into production pipelines.