Critical RCE Vulnerability in Picklescan: Unrestricted ctypes Access
Summary
GHSA-4675-36f9-wf6r: Picklescan does not block ctypes. Affects picklescan versions < 0.0.33. Fixed in 0.0.33. 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 for security vulnerabilities. It aims to prevent the execution of malicious code during the deserialization process. However, it currently fails to flag the ctypes module as dangerous, which poses a significant security risk.
Vulnerability Detail
The vulnerability arises from Picklescan's inability to recognize the ctypes module as a threat. Ctypes is a foreign function interface library that allows for direct interaction with C functions and memory manipulation. This oversight can lead to remote code execution (RCE) as attackers can exploit ctypes to bypass security measures and execute arbitrary code. The potential for dismantling Python sandboxes and accessing raw memory makes this vulnerability particularly severe.
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.33
This is the first release that contains the fix.
pip install --upgrade "picklescan==0.0.33"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid using Picklescan for untrusted pickle files until the package is updated. Additionally, consider implementing additional security measures in your application to restrict the use of ctypes.
Conclusion
The vulnerability in Picklescan due to the unrestricted access to the ctypes module poses a significant risk of remote code execution. Users are advised to update to the latest version to mitigate this threat and to consider additional security measures while using the package.
See every vulnerability recorded for picklescan →
FAQ
Picklescan is a Python package that analyzes and validates pickle files to prevent the execution of malicious code during deserialization.
Ctypes is a Python library that allows for calling C functions and manipulating memory directly, which can lead to security vulnerabilities if misused.
An attacker can create a malicious pickle file that uses ctypes to execute arbitrary code, potentially leading to remote code execution.
The CVSS score for this vulnerability is 8.9, indicating a high severity level.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Check your application against this vulnerability using the Vulert playground at Vulert Scanner without needing to sign up.
References
Related vulnerabilities
Recent vulnerabilities recorded for picklescan.