The vulnerability is a detection bypass in the picklescan library, where it fails to identify operator.methodcaller as a dangerous function when scanning pickle files. An attacker could craft a malicious pickle file using this function to achieve remote code execution, and picklescan would incorrectly report the file as safe.
The patch 70c1c6c31beb6baaf52c8db1b6c3c0e84a6f9dab addresses this vulnerability by adding methodcaller to the _unsafe_globals blocklist within src/picklescan/scanner.py.
The core of the flawed logic resides in the _build_scan_result_from_raw_globals function, which is responsible for checking globals against this blocklist. Because the blocklist was incomplete, this function would fail to flag the malicious payload.
The user-facing functions scan_file_path and scan_bytes are the entry points for the scanning process. When a user scans a malicious pickle file, these functions are on the call stack and they rely on the flawed _build_scan_result_from_raw_globals function, ultimately returning an incorrect safety assessment. Therefore, these functions would appear in a runtime profile when the vulnerability is triggered (i.e., when a scan fails to detect the threat).