Skip to main content
Vulnerability Database/CVE-2026-100841

CVE-2026-100841: MONAI Pickle Deserialization RCE Vulnerability

CVE-2026-100841 is a pickle deserialization vulnerability in MONAI that allows local attackers to execute arbitrary code through malicious cache files. This article covers the technical details, affected versions, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-100841 Overview

CVE-2026-100841 is an insecure deserialization vulnerability in MONAI 1.6.0, the Medical Open Network for Artificial Intelligence framework. The flaw resides in PersistentDataset (monai/data/dataset.py), which rejects the combination of track_meta=True with weights_only=True. This forces users caching MetaTensors to invoke torch.load(hashfile, weights_only=False). Related helpers in monai/data/utils.py call pickle.loads on cached content and derive cache keys with hashlib.md5. A local user with write access to a shared cache_dir can plant a malicious pickle that executes arbitrary code when another user's pipeline reads the cache [CWE-502].

Critical Impact

A local attacker with write access to a shared MONAI cache directory can achieve arbitrary code execution in the context of any user whose pipeline subsequently reads from that cache.

Affected Products

  • Project-MONAI MONAI 1.6.0
  • All released versions of the monai pip package
  • MONAI pipelines using PersistentDataset with MetaTensors (default in MONAI >= 1.0)

Discovery Timeline

  • 2026-09-27 - CVE-2026-100841 published to NVD
  • 2026-09-30 - Last updated in NVD database

Technical Details for CVE-2026-100841

Vulnerability Analysis

MONAI's PersistentDataset caches preprocessed tensors to disk to accelerate repeated training runs. When track_meta=True is set, MONAI stores MetaTensor objects that carry metadata beyond raw tensor contents. PyTorch's weights_only=True loader does not support arbitrary Python objects, so MONAI explicitly forbids combining track_meta=True with weights_only=True. This forces the pipeline to call torch.load(hashfile, weights_only=False), which internally invokes pickle.loads on the cache file.

Cache files are keyed by hashlib.md5 hashes of transform parameters. An attacker who can predict or enumerate cache keys and write to the cache_dir can replace a legitimate cache entry with a crafted pickle payload. The next MONAI process that loads the cache deserializes the payload and executes attacker-controlled code in that user's process context.

Root Cause

The root cause is unsafe deserialization of untrusted on-disk content. pickle.loads and torch.load with weights_only=False allow arbitrary callables to execute during object reconstruction. Combined with the use of shared, often world-writable cache locations such as /tmp/monai_cache, HPC scratch directories, or ~/.cache/monai, there is no integrity check or signature validation on cached artifacts.

Attack Vector

Exploitation requires local write access to the cache_dir used by a MONAI PersistentDataset. The attacker crafts a malicious pickle file placed at a cache path matching the expected MD5 hash of a target transform. When another user runs a MONAI pipeline that reads the cache, torch.load deserializes the payload. Code execution occurs with the privileges of the victim process. The vulnerability is particularly impactful on multi-tenant HPC clusters and shared research workstations where multiple users share scratch space.

No verified public exploit code is available. See the GitHub Security Advisory GHSA-636w-j999-g7x5 and the VulnCheck Advisory for MONAI 1.6.0 for additional technical detail.

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2026-100841

Indicators of Compromise

  • Unexpected pickle files or modifications in MONAI cache_dir locations such as /tmp/monai_cache, HPC scratch volumes, or ~/.cache/monai.
  • Cache files written by a user other than the pipeline owner, especially where file ownership differs from the running MONAI process user.
  • Child processes spawned from Python interpreters running MONAI workloads that execute shells, network tools, or compilers.

Detection Strategies

  • Monitor file creation and modification events in MONAI cache directories using Linux audit rules or inotify.
  • Alert on Python processes loading torch that subsequently execute /bin/sh, curl, wget, or outbound socket connections.
  • Hunt for pickle opcodes (c__builtin__, cos, csubprocess) inside files under cache paths through periodic content scans.

Monitoring Recommendations

  • Enable endpoint telemetry on shared research hosts and HPC login nodes to capture process ancestry for Python workloads.
  • Baseline the set of users expected to write to shared cache_dir locations and alert on deviations.
  • Centralize audit logs for /tmp, scratch filesystems, and ~/.cache/monai to a security data lake for retrospective hunting.

How to Mitigate CVE-2026-100841

Immediate Actions Required

  • Set cache_dir to a per-user directory with mode 0700 and never share it across accounts.
  • Audit existing MONAI cache directories for files owned by unexpected users and purge any untrusted content.
  • Disable PersistentDataset or set cache_num=0 on multi-tenant systems until a patched release is available.
  • Restrict interactive and batch job access to shared scratch filesystems where MONAI pipelines run.

Patch Information

No patched version of the monai pip package is available as of the advisory. Track the GitHub Security Advisory GHSA-636w-j999-g7x5 for upstream remediation status.

Workarounds

  • Replace PersistentDataset with CacheDataset or Dataset to avoid on-disk pickle caches.
  • Store cache_dir on a filesystem with strict per-user ACLs and disable world- and group-write permissions.
  • Pin track_meta=False where metadata is not required so weights_only=True becomes usable with torch.load.
  • Validate cache integrity by maintaining a signed manifest of expected cache file hashes and rejecting unknown files.
bash
# Configuration example: restrict MONAI cache_dir to the current user only
export MONAI_CACHE_DIR="$HOME/.cache/monai-$(id -u)"
mkdir -p "$MONAI_CACHE_DIR"
chmod 700 "$MONAI_CACHE_DIR"

# Verify no other user can write to the cache
find "$MONAI_CACHE_DIR" -not -user "$(id -un)" -print

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.