Miggo Logo

CVE-2025-58757: Monai: Unsafe use of Pickle deserialization may lead to RCE

8.8

CVSS Score
3.1

Basic Information

EPSS Score
0.17301%
Published
9/9/2025
Updated
9/9/2025
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
monaipip<= 1.5.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the unsafe use of pickle.loads for deserialization within the monai.data.utils.pickle_operations function. The vulnerability can be triggered when this function is called with the is_encode parameter set to False.

The exploit chain typically begins when a user processes a dataset using a PyTorch DataLoader configured with collate_fn=monai.data.utils.list_data_collate. If the dataset contains a dictionary with a key ending in _transforms (the default suffix) and a value that is a maliciously crafted pickled byte string, this payload gets included in a batch.

While iterating over the DataLoader, the application will likely need to de-collate the batch to process individual items. This de-collation process, as implemented in monai.data.utils.decollate_batch, calls pickle_operations with is_encode=False. This triggers the pickle.loads call on the malicious payload, resulting in arbitrary code execution on the machine running the code.

Therefore, a runtime profile of an exploit would show list_data_collate as the entry point for handling the data, followed by decollate_batch to unpack the batch, and finally pickle_operations where the malicious code is actually executed via pickle.loads.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

>To pr*v*nt t*is r*port *rom **in* ***m** in*ppli***l* or out o* s*op*, *u* to t** proj**t's uniqu* n*tur* (*or m**i**l *ppli**tions) *n* wi**spr*** popul*rity (*k+ st*rs), it's import*nt to p*y *tt*ntion to som* o* t** proj**t's in**r*nt s**urity i

Reasoning

T** vuln*r**ility st*ms *rom t** uns*** us* o* `pi*kl*.lo**s` *or **s*ri*liz*tion wit*in t** `mon*i.**t*.utils.pi*kl*_op*r*tions` *un*tion. T** vuln*r**ility **n ** tri***r** w**n t*is *un*tion is **ll** wit* t** `is_*n*o**` p*r*m*t*r s*t to `**ls*`.