Executive brief
picklescan is a security tool used to scan Python pickle files and Machine Learning models for malicious code. A vulnerability in versions before 0.0.28 allows specially crafted files to bypass security checks by using a specific PyTorch function. If a user trusts the scan results and opens the file, an attacker could gain full control over the system and execute arbitrary commands.
Technical details
A deserialization vulnerability (CWE-502) exists in picklescan due to an incomplete blocklist of dangerous functions. Specifically, the tool fails to identify the 'torch.jit.unsupported_tensor_ops.execWrapper' function when embedded in pickle files. An attacker can craft a malicious pickle file using this function to execute arbitrary Python code. If a victim scans the file with an affected version of picklescan and subsequently loads it using 'pickle.load()', the payload will execute. This bypasses the primary security guarantee of the library. The issue is resolved in version 0.0.28.
Affected products
- mmaitre314 picklescan < 0.0.28
Timeline
- 2025-08-22: advisory: Initial GitHub security advisory published
- 2026-06-23: disclosed: CVE-2025-71370 published to NVD