CVE-2025-58757

8.8 HIGH

📋 TL;DR

This vulnerability in MONAI's pickle_operations function allows arbitrary code execution through unsafe deserialization of pickle data. Any system running MONAI versions up to 1.5.0 that processes untrusted data is affected, particularly healthcare imaging AI applications.

💻 Affected Systems

Products:
  • MONAI (Medical Open Network for AI)
Versions: All versions up to and including 1.5.0
Operating Systems: All platforms running Python
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability is in core data processing functionality that may be called automatically when processing certain dictionary structures.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with attacker gaining remote code execution, potentially accessing sensitive medical imaging data and pivoting to other systems.

🟠

Likely Case

Data exfiltration or system disruption through malicious pickle payloads in processed medical imaging data.

🟢

If Mitigated

Limited impact if proper input validation and network segmentation are in place, though deserialization vulnerabilities remain dangerous.

🌐 Internet-Facing: HIGH - If MONAI applications are exposed to untrusted networks, attackers can directly exploit this vulnerability.
🏢 Internal Only: MEDIUM - Internal exploitation still possible via malicious data injection, but requires initial access to internal networks.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Pickle deserialization vulnerabilities are well-understood and easily weaponized with standard Python pickle exploitation techniques.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: None available as of publication

Vendor Advisory: https://github.com/Project-MONAI/MONAI/security/advisories/GHSA-p8cm-mm2v-gwjm

Restart Required: No

Instructions:

No official patch available. Monitor MONAI GitHub repository for security updates and apply immediately when released.

🔧 Temporary Workarounds

Disable pickle_operations function

all

Modify MONAI code to remove or disable the vulnerable pickle_operations function

# Edit monai/data/utils.py and remove or comment out pickle_operations function

Implement input validation

all

Add strict input validation to reject any data containing pickle-serialized content

# Add validation before pickle.loads() calls to check for safe data types only

🧯 If You Can't Patch

  • Network segmentation: Isolate MONAI systems from untrusted networks and implement strict firewall rules
  • Monitor for suspicious pickle deserialization attempts and implement application-level logging

🔍 How to Verify

Check if Vulnerable:

Check MONAI version and inspect monai/data/utils.py for pickle_operations function with pickle.loads() calls

Check Version:

python -c "import monai; print(monai.__version__)"

Verify Fix Applied:

Verify pickle_operations function is removed or properly secured with input validation

📡 Detection & Monitoring

Log Indicators:

  • Unexpected pickle deserialization errors
  • Suspicious import statements in error logs
  • Unusual process execution from MONAI context

Network Indicators:

  • Unexpected outbound connections from MONAI systems
  • Large data transfers from medical imaging systems

SIEM Query:

source="monai" AND ("pickle" OR "deserialization" OR "__reduce__")

🔗 References

📤 Share & Export