# MONAI NumpyReader unsafe deserialization in image loading

Source: https://junglewise.ai/threats/monai-numpyreader-unsafe-deserialization-in-image-loading-44691ae5  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-18. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

Severity: high · CVSS 7.8 · Published 2026-08-18

MONAI is a deep learning framework widely used for medical imaging analysis. Its NumpyReader component, which automatically loads .npy and .npz files in the standard data pipeline, unconditionally enables Python pickle deserialization. An attacker can achieve arbitrary code execution by distributing a malicious .npy file through shared datasets or supply chains, then having a researcher or system load it via MONAI's LoadImage transform or dataset classes.

Technologies: [monai (PyPI)](https://junglewise.ai/threats/technologies/monai). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** High severity, with a CVSS score of 7.8, published 18 August 2026.

**Which products and versions are affected?** monai (PyPI) < 1.6.0.

**Is there a fix for This vulnerability?** A patch was published on 2026-06-11: Fixed in MONAI 1.6.0 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked with local access, in a software library.

**Am I affected?** Check whether you run monai (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is a deserialization flaw (CWE-502) in the NumpyReader.read() method at monai/data/image_reader.py line 1276. The code calls np.load(name, allow_pickle=True, **kwargs_), hardcoding allow_pickle=True despite Python's pickle being known to execute arbitrary code via __reduce__ hooks during deserialization. NumpyReader is automatically invoked by the LoadImage transform for .npy/.npz files, integrating the vulnerability into all standard data loading patterns. The allow_pickle parameter is explicitly excluded from user-overridable kwargs (per the docstring), preventing mitigation. A proof-of-concept demonstrates instantiation of a malicious class with a crafted __reduce__ method that executes arbitrary shell commands. The fix, released in version 1.6.0, disables pickle deserialization. Attack requires no authentication or privileges—only that a victim loads a crafted file via MONAI's standard pipeline.

## Affected products

- Project-MONAI MONAI < 1.6.0

## Timeline

- 2026-06-11: disclosed: Published to GitHub Advisory Database
- 2026-06-11: patched: Fixed in MONAI 1.6.0

## References

- [https://api.github.com/users/romain-deperne](https://api.github.com/users/romain-deperne)
- [https://github.com/romain-deperne](https://github.com/romain-deperne)
- [https://api.github.com/users/romain-deperne/gists%7B/gist_id%7D](https://api.github.com/users/romain-deperne/gists%7B/gist_id%7D)
- [https://api.github.com/users/romain-deperne/repos](https://api.github.com/users/romain-deperne/repos)
- [https://avatars.githubusercontent.com/u/61591917?v=4](https://avatars.githubusercontent.com/u/61591917?v=4)
- [https://api.github.com/users/romain-deperne/events%7B/privacy%7D](https://api.github.com/users/romain-deperne/events%7B/privacy%7D)

## Related threats

- [MONAI MONAILabel server crash and inference corruption via crafted DICOM](https://junglewise.ai/threats/cve-2026-48705-monailabel-server-crash-and-silent-inference-corruption-via)
- [MONAI unsafe deserialization in algo_from_pickle](https://junglewise.ai/threats/cve-2026-100846-monai-before-1-5-2-contains-a-deserialization-of-untrusted-data)
- [MONAI unsafe deserialization in NumpyReader](https://junglewise.ai/threats/cve-2026-100845-monai-before-1-6-0-contains-an-unsafe-deserialization)
- [MONAI OS command injection in nnUNetV2Runner](https://junglewise.ai/threats/cve-2026-100844-monai-before-1-6-0-is-vulnerable-to-os-command-injection-in-the)
- [MONAI remote code execution in algo_from_pickle](https://junglewise.ai/threats/cve-2026-100843-monai-versions-before-1-6-0-contain-a-remote-code-execution)
