MEDIUM6.5
PYSEC-2025-20
Quick fix
PYSEC-2025-20 — picklescan: upgrade to the fixed version with the command below.
pip install --upgrade 'picklescan>=e58e45e0d9e091159c1554f9b04828bbb40b9781'Details
picklescan before 0.0.23 is vulnerable to a ZIP archive manipulation attack that causes it to crash when attempting to extract and scan PyTorch model archives. By modifying the filename in the ZIP header while keeping the original filename in the directory listing, an attacker can make PickleScan raise a BadZipFile error. However, PyTorch's more forgiving ZIP implementation still allows the model to be loaded, enabling malicious payloads to bypass detection.
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'