Description
In MONAI 1.6.0, PersistentDataset (monai/data/dataset.py) explicitly rejects the combination track_meta=True with weights_only=True, forcing users who cache MetaTensors (the default tensor type in MONAI >= 1.0) to run torch.load(hashfile, weights_only=False). Related cache helpers in monai/data/utils.py also call pickle.loads on cached content and derive cache keys with hashlib.md5. As a result, a local user with write access to a shared or world-writable cache_dir (e.g. /tmp/monai_cache, HPC scratch, ~/.cache/monai) can place a malicious pickle file that is deserialized the next time another user's MONAI pipeline reads the cache, resulting in arbitrary code execution in that user's context. All released versions of the monai pip package are affected; no patched version is available as of the advisory.
Published: 2026-09-27
Score: 8.5 High
EPSS: n/a
KEV: No
Impact: Remote Code Execution
Action: Mitigate
AI Analysis

Impact

The vulnerability stems from the PersistentDataset class in MONAI 1.6.0, which deserializes cached MetaTensors using pickle.loads without validating the content. When users cache data in a shared or world‑writable cache directory, an attacker can place a malicious pickle file that will be deserialized the next time another user runs a MONAI pipeline. This leads to arbitrary code execution in the context of the affected user. The flaw is identified as CWE‑502.

Affected Systems

All released versions of the MONAI Python package are affected, including 1.6.0 and earlier releases. Any installation that stores cached data in a location such as /tmp/monai_cache, an HPC scratch area, or $HOME/.cache/monai can be vulnerable if that directory is writable by users other than the one running the MONAI code. The vendor is Project MONAI (product MONAI).

Risk and Exploitability

The known CVSS base score is 8.5, indicating a high severity of potential impact. The EPSS score is not available, but the absence of a patch, coupled with the ability to inject code through a writable cache, makes exploitation plausible in environments where cache directories are shared. The vulnerability is not yet listed in the CISA KEV catalog. Attackers would need local write access to the cache directory; no network attack surface is reported. Given these factors, the risk remains significant for any environment that allows shared cache writes.

Generated by OpenCVE AI on September 27, 2026 at 03:51 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Ensure that the MONAI cache directory is owned by the user and has permissions set to 700 or less permissive; do not use world‑writable locations such as /tmp or shared scratch spaces for caching.
  • Configure MONAI to use a private cache location by setting the environment variable MONAI_CACHE_DIR to a path within the user’s home directory and verify that the path exists and is writable only by that user.
  • If exclusive cache access cannot be guaranteed, disable caching in MONAI scripts by setting cache_dir=None or removing caching arguments, and delete any existing cache files before running pipelines.

Generated by OpenCVE AI on September 27, 2026 at 03:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sun, 27 Sep 2026 02:00:00 +0000

Type Values Removed Values Added
Description In MONAI 1.6.0, PersistentDataset (monai/data/dataset.py) explicitly rejects the combination track_meta=True with weights_only=True, forcing users who cache MetaTensors (the default tensor type in MONAI >= 1.0) to run torch.load(hashfile, weights_only=False). Related cache helpers in monai/data/utils.py also call pickle.loads on cached content and derive cache keys with hashlib.md5. As a result, a local user with write access to a shared or world-writable cache_dir (e.g. /tmp/monai_cache, HPC scratch, ~/.cache/monai) can place a malicious pickle file that is deserialized the next time another user's MONAI pipeline reads the cache, resulting in arbitrary code execution in that user's context. All released versions of the monai pip package are affected; no patched version is available as of the advisory.
Title MONAI 1.6.0 PersistentDataset Remote Code Execution via Pickle Cache
First Time appeared Project-monai
Project-monai monai
Weaknesses CWE-502
CPEs cpe:2.3:a:project-monai:monai:*:*:*:*:*:*:*:*
Vendors & Products Project-monai
Project-monai monai
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.5, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


Subscriptions

Project-monai Monai
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-09-27T01:28:37.499Z

Reserved: 2026-09-26T23:23:03.411Z

Link: CVE-2026-100841

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-27T02:17:22.543

Modified: 2026-09-27T02:17:22.543

Link: CVE-2026-100841

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-27T05:30:17Z

Weaknesses
  • CWE-502

    Deserialization of Untrusted Data