Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious YAML with shell metacharacters in dataset_name_or_id
-
DeliveryDeliver crafted config to victim (shared repo/dataset)
-
ExploitVictim loads config via nnUNetV2Runner and starts training
-
Executiondataset_name_or_id concatenated into subprocess shell=True
-
ImpactInjected commands execute as the victim user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the victim to load an attacker-controlled YAML configuration file into monai.apps.nnunet.nnunetv2_runner.nnUNetV2Runner and then launch a training/validation job (e.g. train_single_model()), which concatenates the config's dataset_name_or_id value (or CLI/kwargs arguments) into a shell command executed via subprocess with shell=True. The limiting factors are: no network-facing entry point (the attacker must get a malicious config to the victim via a shared dataset, repo, or model exchange), the victim must actively run the training pipeline on that config, and code execution is bounded to the privileges of the user running the job. It affects MONAI versions before 1.6.0 with no special product feature needing to be enabled beyond ordinary nnU-Net runner usage. |
| Impact | This is a genuine code-execution flaw (CWE-78) but its real-world risk is materially lower than the vendor's 8.6 CVSS4 score suggests, because the vector is fundamentally config-trust-dependent rather than a remote exploit. The vendor vector CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N marks it Local with NO user interaction, which conflicts with the advisory's own text and PoC: exploitation requires a victim to load an attacker-crafted YAML file and then invoke a training/validation job (nnUNetV2Runner(input_config=YAML) + train_single_model()). That is user interaction and an attack requirement, so PR:N/UI:N overstates exposure - the real gate is 'you must run a malicious config someone gave you.' A working PoC exists in the GHSA advisory (verified on Windows using '4 & echo ... & rem'), so publicly available exploit code exists, but there is NO EPSS score, NO CISA KEV listing, and NO SSVC decision data in the input. The absence of KEV/EPSS combined with a local, config-supply-chain attack model points to opportunistic/targeted abuse (e.g. a poisoned shared config in a research pipeline) rather than mass automated exploitation. Net: a real issue worth patching to 1.6.0, but not an internet-facing emergency. |
| Exploit ScenarioDerived | An attacker distributes a malicious nnU-Net YAML config (e.g. via a shared dataset repo, model zoo, or collaboration channel) whose dataset_name_or_id field embeds shell metacharacters and commands, such as '4 & echo pwned > out.txt & rem'. A medical-imaging researcher loads it with nnUNetV2Runner and starts a training job, at which point the string is concatenated into a subprocess call with shell=True and the injected commands run with the researcher's privileges. A proof-of-concept confirming this (on Windows) is published in the GitHub Security Advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 27, 2026
OS command injection in MONAI's nnUNetV2Runner (monai.apps.nnunet.nnunetv2_runner) allows arbitrary command execution with the privileges of the user running an nnU-Net training or validation job, because values such as dataset_name_or_id from a YAML config - or from CLI/kwargs arguments - are concatenated into a command string and passed to subprocess with shell=True without quoting or validation. All MONAI releases before 1.6.0 are affected; exploitation is not network-facing and requires the victim to load an attacker-supplied configuration file and then launch a job such as train_single_model(), so the real-world risk is config-trust dependent rather than remotely triggerable. Publicly available exploit code exists (a Windows-verified proof of concept is included in the GHSA advisory), no authentication is required in the assessed vector (PR:N), and no confirmed active exploitation (CISA KEV) has been reported at time of analysis. Vendor-released patch: MONAI 1.6.0.
RemediationAI
Upgrade to MONAI 1.6.0 or later (Vendor-released patch: 1.6.0; the upstream fix is PR https://github.com/Project-MONAI/MONAI/pull/8885, see also the GHSA advisory at https://github.com/Project-MONAI/MONAI/security/advisories/GHSA-rghg-q7wp-9767). MONAI is typically pinned via pip/conda, so verify the resolved version with 'python -c "import monai; print(monai.__version__)"' and rebuild any container images that bundled a pre-1.6.0 release. If immediate upgrade is not possible, the highest-value compensating control is to never instantiate nnUNetV2Runner with a configuration file or CLI/kwargs values that originated outside a trusted source - treat shared datasets, downloaded model bundles, and repository YAML files as untrusted input, with the trade-off that this blocks the config-exchange workflows MONAI is often used for. A second option is to enforce strict type validation of dataset_name_or_id before it reaches the runner (accept only integer dataset IDs, reject any string containing ';', '&', '|', '$', backticks, quotes, or newlines), which requires wrapping or monkey-patching the caller code and will break legitimate configs that use string dataset names. Running training jobs inside a container or sandbox with a least-privilege user, no access to host credentials or mounted secrets, and restricted outbound network access limits the blast radius of successful exploitation but does not prevent the injection itself. Finally, patching or vendoring the installed module so the command is executed with shell=False and an argument vector (or with shlex.quote on each interpolated value) neutralizes the injection, at the cost of maintaining a forked dependency until an official upgrade can be scheduled. Exploitation is not network-facing, so perimeter controls are of limited value; prioritization should focus on hosts where untrusted nnU-Net configs are processed.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
MONAI (Medical Open Network for Artificial Intelligence) is a PyTorch-based deep learning framework for medical imaging, and nnUNetV2Runner is a Python wrapper class that drives the nnU-Net v2 pipeline by assembling and invoking shell commands for tasks such as dataset conversion, preprocessing, and training. The root cause is CWE-78 (Improper Neutralization of Special Elements used in an OS Command): the runner takes user-controlled configuration values - most notably the YAML key dataset_name_or_id, and also values supplied via CLI or kwargs - and interpolates them directly into a command string that is handed to subprocess with shell=True, so the underlying shell parses metacharacters rather than treating the value as data. On Linux a ';' terminates the intended command and starts an attacker-controlled one; on Windows the equivalent separators are '&' or '&&', as demonstrated in the JPCERT/CC-reported proof of concept which appended '4 & echo "This is exploited" > ... & rem' to dataset_name_or_id. The same class of quoting defect exists in any language that builds shell strings by concatenation rather than using argument vectors (subprocess without shell=True, or shlex.quote); the fix in MONAI 1.6.0 (upstream PR #8885) addresses this by removing the shell interpretation path. The affected CPE is cpe:2.3:a:project-monai:monai:*:*:*:*:*:*:*:* for versions below 1.6.0, and the independent assessment scores it CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - local attack vector, no privileges required, but user interaction required to load and run the malicious config - which is materially more conservative than the 8.6 CVSS 4.0 figure reported alongside the advisory.
Know when Monai gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Local config-file vector (AV:L) needing the victim to load and run a crafted YAML (UI:R); no attacker privileges (PR:N); full RCE in the victim's context yields C:H/I:H/A:H.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 1 pypi packages depend on monai (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 1.6.0.
Articles & Coverage 1
Technical POC Analysis
Evidence base: GitHub Security Advisory GHSA-rghg-q7wp-9767 (VN: JVN#50379904).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
MONAI, an open-source medical imaging AI framework used in research and clinical model development pipelines, contains a command injection flaw affecting all releases before 1.6.0 that lets a malicious configuration file execute arbitrary code under the account running an nnU-Net training or validation job. Because exploitation requires a user to open and run an attacker-supplied YAML config rather than being reachable over the network, the practical exposure is concentrated in teams that exchange model configurations with external collaborators or download them from untrusted sources. Leadership should care because affected jobs often run on shared GPU workstations and research servers where the executing user may hold broad access to datasets, model artifacts, and adjacent systems.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Related Vulnerabilities in MONAI Deserialization, Injection, and RCE Flaws
View all 7MONAI (Medical Open Network for AI) is an AI toolkit for health care imaging. Rated high severity (CVSS 8.8), this vulne
MONAI (Medical Open Network for AI) is an AI toolkit for health care imaging. Rated high severity (CVSS 8.8), this vulne
MONAI versions up to 1.5.1 contain a path traversal vulnerability in the `_download_from_ngc_private()` function that fa
Arbitrary code execution in MONAI's Auto3DSeg component (versions 1.6.0 through 1.6.0rc1) lets a crafted work directory
Remote code execution in Project MONAI 0.4.0 through 1.6.0 requires an on-path attacker to tamper with SENet pretrained
Insecure deserialization in Project MONAI's nnUNetV2Runner (versions 1.2.0 up to but not including 1.6.1) lets an attack
EUVD-2026-87844
GHSA-x7wh-49x3-6748
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB