| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| picklescan | pip | < 0.0.33 | 0.0.33 |
The vulnerability in picklescan is due to an incomplete blocklist of dangerous modules. The ctypes module, which allows for foreign function interface interactions and can be used for remote code execution, was not included in the _unsafe_globals list. The patch rectifies this by adding "ctypes": "*" to this blocklist within src/picklescan/scanner.py.
The function _build_scan_result_from_raw_globals is the core component that uses this blocklist to determine if a global is malicious. Before the patch, it would incorrectly classify ctypes as safe. The main user-facing functions, scan_pickle_file and scan_pickle_bytes, rely on this flawed logic, and thus are the entry points for the vulnerability. When picklescan is used to scan a malicious pickle file, these functions would appear in a runtime profile and would fail to report the threat. The patch fixes the vulnerability by updating the blocklist data that these functions depend on.
picklescan.scanner._build_scan_result_from_raw_globalssrc/picklescan/scanner.py
picklescan.scanner.scan_pickle_filesrc/picklescan/scanner.py
picklescan.scanner.scan_pickle_bytessrc/picklescan/scanner.py