Critical Vulnerability in Picklescan: Missing Detection of Malicious Code Execution
Summary
GHSA-mg57-j93w-g3c7: Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-6vqj-c2q5-j97w. Affects picklescan versions < 0.0.29. Fixed in 0.0.29. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Picklescan is a Python package designed to analyze and validate pickle files, which are a way to serialize and deserialize Python objects. It is widely used for ensuring the integrity and safety of data being processed in Python applications. However, prior to version 0.0.29, Picklescan had a significant vulnerability that allowed attackers to embed malicious code within pickle files, which could be executed when the files were loaded. This vulnerability poses a serious risk to applications that rely on Picklescan for secure data handling.
Vulnerability Detail
The vulnerability arises from Picklescan's failure to detect the profile.Profile.runctx function when analyzing pickle files. This oversight allows remote attackers to craft malicious pickle files that exploit the reduce method, leading to potential remote code execution when the compromised files are loaded. The implications of this vulnerability are severe, as it can lead to unauthorized access and control over the affected systems, making it critical for users to address this issue promptly.
How To Fix
Latest published version: 1.0.5 as of 22 Oct 2026
pip install --upgrade "picklescan==1.0.5"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.0.29
This is the first release that contains the fix.
pip install --upgrade "picklescan==0.0.29"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users should avoid loading untrusted pickle files until they have updated to the patched version of Picklescan. Additionally, consider implementing strict validation checks on pickle files before processing them to mitigate the risk of executing malicious code.
Conclusion
The vulnerability in Picklescan poses a significant risk to applications that utilize this package for handling pickle files. Users are strongly encouraged to update to version 0.0.29 or later to mitigate the risk of remote code execution. Additionally, employing best practices for handling untrusted data can further enhance security.
See every vulnerability recorded for picklescan →
FAQ
The CVSS score of this vulnerability is 8.1, indicating a high severity level.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground at Vulert Scanner without needing to sign up.
Pickle files are a way to serialize and deserialize Python objects, allowing for easy storage and transmission of complex data structures in Python applications.
If an immediate upgrade is not possible, avoid loading untrusted pickle files and implement strict validation checks on any pickle files you process.
More information can be found in the original advisory linked to the GitHub security advisory database.
Related vulnerabilities
Recent vulnerabilities recorded for picklescan.