CRITICAL9.8
PYSEC-2025-21
Quick fix
PYSEC-2025-21 — picklescan: upgrade to the fixed version with the command below.
pip install --upgrade 'picklescan>=e58e45e0d9e091159c1554f9b04828bbb40b9781'Details
picklescan before 0.0.23 fails to detect malicious pickle files inside PyTorch model archives when certain ZIP file flag bits are modified. By flipping specific bits in the ZIP file headers, an attacker can embed malicious pickle files that remain undetected by PickleScan while still being successfully loaded by PyTorch's torch.load(). This can lead to arbitrary code execution when loading a compromised model.
Are you affected?
Enter the version of the package you're using.
Affected packages
PyPI/picklescan
Introduced in:
0Fixed in: e58e45e0d9e091159c1554f9b04828bbb40b9781Fix
pip install --upgrade 'picklescan>=e58e45e0d9e091159c1554f9b04828bbb40b9781'