CVE-2025-1944
Python vulnerability analysis and mitigation

Overview

CVE-2025-1944 affects picklescan versions before 0.0.23, exposing a vulnerability to ZIP archive manipulation attacks. The vulnerability was discovered in March 2025 and allows attackers to bypass security scanning of PyTorch model archives. When an attacker modifies the filename in the ZIP header while maintaining the original filename in the directory listing, it causes picklescan to crash with a BadZipFile error, while PyTorch's more permissive ZIP implementation still loads the potentially malicious model (Sonatype Blog, NVD).

Technical details

The vulnerability stems from the difference in ZIP file handling between Python's built-in zipfile module and PyTorch's implementation. Python's zipfile module performs strict integrity checks during ZIP file extraction, raising a BadZipFile error if the filename in the ZIP header doesn't match the directory listing. However, PyTorch employs a more tolerant ZIP handling mechanism that ignores these discrepancies. The vulnerability has been assigned a CVSS v4.0 base score of 5.3 (Medium) with the vector string CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:L/SC:N/SI:L/SA:L (GitHub Advisory, Sonatype CVE).

Impact

The vulnerability impacts organizations and individuals using picklescan to detect malicious pickle files in PyTorch models. Attackers can exploit this vulnerability to embed malicious payloads inside PyTorch model archives while preventing picklescan from scanning them. This technique is particularly concerning as it could be leveraged in supply chain attacks to distribute backdoored models through platforms like Hugging Face (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in picklescan version 0.0.23. Organizations are advised to upgrade to this version or later. The fix includes implementing a more tolerant ZIP parser that can handle minor ZIP header inconsistencies more gracefully instead of failing outright. Additionally, the updated version includes functionality to detect malformed ZIPs and attempt to extract valid files while logging warnings instead of crashing (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management