picklescan before 1.0.4 fails to block at least seven Python standard library modules (including uuid, _osx_support, _aix_support, _pyrepl.pager, and imaplib) exposing eight functions that provide direct arbitrary command execution. Attackers can craft malicious pickle files importing these unblocked modules to achieve remote code execution while bypassing picklescan's safety validation entirely.
picklescan maintains a list of blocked Python modules and functions that could be used for code execution during pickle deserialization. However, at least seven modules from the Python standard library (including uuid, _osx_support, _aix_support, _pyrepl.pager, imaplib) were not included in this blocklist (CWE-184: Incomplete List of Disallowed Inputs). These modules collectively expose eight functions allowing direct execution of arbitrary system commands. An attacker can craft a malicious pickle file importing one of these unblocked modules — picklescan will consider such a file safe and allow it through, after which its deserialization will lead to arbitrary code execution.
An attacker can achieve remote code execution (RCE) on a machine processing a malicious pickle file, completely bypassing the security protections offered by picklescan. This results in a complete breach of system confidentiality, integrity, and availability.
picklescan should be updated to version 1.0.4 or newer. Details are available in the vendor's references: https://github.com/mmaitre314/picklescan/security/advisories/GHSA-g38g-8gr9-h9xp
picklescan versions prior to 1.0.4
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X