PickleScan 0-Day Vulnerabilities Enable Arbitrary Code Execution via Malicious PyTorch Models
Recent findings have exposed multiple critical zero-day vulnerabilities in PickleScan, a widely used open-source tool designed to scan machine learning models for malicious code. These vulnerabilities present significant security risks, particularly in…
Recent findings have exposed multiple critical zero-day vulnerabilities in PickleScan, a widely used open-source tool designed to scan machine learning models for malicious code. These vulnerabilities present significant security risks, particularly in the context of AI models using PyTorch.
Technical Vulnerabilities in PickleScan
PickleScan is employed in the AI industry to assess PyTorch models saved with Python’s pickle format. Although pickle is a flexible method, it poses security risks as it can execute arbitrary Python code. This vulnerability allows model files to include hidden commands that could compromise data security and system integrity.
JFrog researchers have identified that attackers can exploit these flaws to bypass PickleScan's safeguards, enabling the execution of malicious code upon loading models in PyTorch.
These vulnerabilities present significant security risks, particularly in the context of AI models using PyTorch.
CVE-2025-10155: This vulnerability allows attackers to bypass file extension checks by renaming a malicious pickle file with a PyTorch-compatible extension such as .bin or .pt. This results in PickleScan's inability to analyze the file, while PyTorch may still execute it. CVE-2025-10156: By manipulating CRC values within ZIP archives, attackers can disrupt PickleScan's ability to function correctly, potentially causing it to crash. Nevertheless, PyTorch may proceed to load the model from the compromised archive. CVE-2025-10157: This issue involves bypassing PickleScan's blocklist of unsafe modules through the use of subclasses or internal imports of potentially harmful modules. As a result, the label changes from "Dangerous" to "Suspicious," yet arbitrary code execution remains possible.
Given the reliance of many platforms and organizations on PickleScan as a primary defense mechanism, these vulnerabilities pose substantial supply chain risks for AI models. It is crucial for users to update to the latest version to mitigate these risks.
JFrog reported these vulnerabilities to the PickleScan maintainer on Thu, Jun 29, 2025. They have been addressed in version 0.0.31, released on Tue, Sep 2, 2025. Users are strongly advised to update to this version promptly. Additionally, it is recommended to avoid using unsafe pickle-based models where possible and to implement layered security measures such as sandboxes, safer formats like Safetensors, and secure model repositories.
Based on reporting by Cyber Security News.
