MONAI before 1.6.0 OS Command Injection via dataset_name_or_id
What fixes it
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
MONAI before 1.6.0 is vulnerable to OS command injection in the nnUNetV2Runner component (monai.apps.nnunet.nnunetv2_runner). User-controlled values taken from the YAML configuration file (notably dataset_name_or_id) and from CLI/kwargs arguments are concatenated into a command string without quoting or validation and then passed to subprocess with shell=True, so shell metacharacters (e.g., ';' on Linux, '&' on Windows) are interpreted. If a victim loads and processes a crafted configuration file — for example by instantiating nnUNetV2Runner with the malicious YAML and invoking a training/validation job such as train_single_model() — arbitrary commands are executed with the privileges of the user running the job.
Text from CVE List
Affected versions 46
- MONAIaffected: all versions before 1.6.0CVE List
- MONAIunaffected: 1.6.0CVE List
- monai, PyPIfrom first release, fixed in 1.6.0OSV
- monai, PyPI0.0.1OSV
- monai, PyPI0.1.0OSV
- monai, PyPI0.2.0OSV
- monai, PyPI0.3.0OSV
- monai, PyPI0.4.0OSV
- monai, PyPI0.5.0OSV
- monai, PyPI0.5.1OSV
- monai, PyPI0.5.2OSV
- monai, PyPI0.5.3OSV
- monai, PyPI0.6.0OSV
- monai, PyPI0.7.0OSV
- monai, PyPI0.8.0OSV
- monai, PyPI0.8.1OSV
- monai, PyPI0.9.0OSV
- monai, PyPI0.9.1OSV
- monai, PyPI1.0.0OSV
- monai, PyPI1.0.1OSV
- monai, PyPI1.1.0OSV
- monai, PyPI1.2.0OSV
- monai, PyPI1.3.0OSV
- monai, PyPI1.3.1OSV
- monai, PyPI1.3.2OSV
- monai, PyPI1.3.2rc1OSV
- monai, PyPI1.3.3rc1OSV
- monai, PyPI1.4.0OSV
- monai, PyPI1.4.0rc1OSV
- monai, PyPI1.4.0rc10OSV
- monai, PyPI1.4.0rc11OSV
- monai, PyPI1.4.0rc12OSV
- monai, PyPI1.4.0rc2OSV
- monai, PyPI1.4.0rc3OSV
- monai, PyPI1.4.0rc4OSV
- monai, PyPI1.4.0rc5OSV
- monai, PyPI1.4.0rc6OSV
- monai, PyPI1.4.0rc7OSV
- monai, PyPI1.4.0rc8OSV
- monai, PyPI1.4.0rc9OSV
- monai, PyPI1.4.1rc1OSV
- monai, PyPI1.5.0OSV
- monai, PyPI1.5.0rc1OSV
- monai, PyPI1.5.1OSV
- monai, PyPI1.5.2OSV
- monai, PyPI1.5.2rc1OSV