/

CVE-2026-100845

Severity:

HIGH RISK

(7.8)

Unsafe Deserialization (CWE-502) in MONAI NumpyReader

CVE-2026-100845

Analyzed

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Arbitrary Code Execution

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

MONAI's NumpyReader may unsafely deserialize data when it loads .npy or .npz files with NumPy pickle support enabled. An attacker who can supply or cause a malicious array file to enter a MONAI data pipeline may execute arbitrary code in the process loading it.

Affected context

The vulnerability occurs in MONAI deployments that use the NumpyReader class to process .npy or .npz files while pickle-enabled loading remains active. It is most relevant when input files originate from untrusted users, external datasets, shared storage, model repositories, or other sources that are not fully controlled by the application.

Exploit preconditions

  • Attack surface: MONAI data-loading pipelines that invoke NumpyReader for NumPy array files
  • Required access: Ability to place, replace, or reference a malicious .npy or .npz file consumed by the pipeline
  • Trigger point: Loading the file through the standard MONAI data pipeline
  • Why exploitation is possible: NumPy loading permits pickle deserialization, allowing crafted file contents to invoke attacker-controlled object behavior during processing

Why this happens

The underlying bug is the unconditional use of numpy.load with allow_pickle=True for input files that may not be trustworthy. Pickle is an executable serialization format rather than a data-only representation; deserializing attacker-controlled content can invoke arbitrary Python behavior. This maps to CWE-502: Unsafe Deserialization, because serialized input is reconstructed without adequately restricting executable object semantics.

Potential impact

  • Arbitrary code execution in the MONAI worker or application process
  • Exposure, alteration, or destruction of locally accessible data
  • Credential theft from the runtime environment
  • Modification of datasets, pipelines, or generated outputs
  • Possible lateral movement depending on process privileges and network access

General mitigation guidance

Mitigation generally centers on treating NumPy files from outside the trust boundary as untrusted and eliminating executable deserialization from routine data loading.

Common defensive patterns include:

  • Prefer data-only formats and loaders that do not support pickle objects
  • Permit pickle-enabled loading only for tightly controlled, authenticated inputs
  • Validate file provenance, type, structure, and expected schema before processing
  • Separate ingestion and transformation workloads from sensitive services
  • Run data-processing components with least privilege and restricted filesystem and network access
  • Use read-only or isolated workspaces for externally sourced datasets where practical
  • Apply dependency and code-review policies that flag unsafe deserialization settings

How teams detect issues like this

Detection can combine source review, automated analysis, and runtime monitoring:

  • Search code and configuration for numpy.load calls using allow_pickle=True
  • Review every data-loading path for trust-boundary assumptions and externally controlled filenames
  • Add static-analysis or dependency-policy rules for unsafe deserialization APIs
  • Monitor pipeline inputs for unexpected NumPy object arrays and files from unapproved sources
  • Record process behavior during ingestion, including unexpected subprocess creation, filesystem writes, or network connections
  • Use automated code-review tools to identify unsafe loader settings and missing validation

Sources

SourceLink
github.comgithub.com/Project-MONAI/MONAI/security/advisories/GHSA-wg9g-w2j2-8pgr
vulncheck.comvulncheck.com/advisories/monai-before-1.6.0-remote-code-execution-via-numpyreader

Frequently asked

questions

It can be exploitable through a remote or distributed workflow when an attacker can upload, replace, or influence a NumPy file that a MONAI service later loads. Direct network reachability alone is not sufficient; control over an input or its source is generally required.

The attacker needs a path to introduce or reference a crafted .npy or .npz file in a pipeline using NumpyReader. This may involve dataset upload permissions, shared storage access, or control over an external data source.

Use data-only loading behavior that does not deserialize pickle objects, and reject or isolate files that require executable object reconstruction. Apply strict format, schema, provenance, and trust-boundary validation before loading.

Treat serialized files as potentially executable input, enforce secure loader policies in code review and CI, minimize processing privileges, and test ingestion paths with adversarially crafted files.

Find out what's already
exploitable in your codebase.