The vulnerability, identified as GHSA-8r4j-24qv-fmq9, is a blacklist bypass in the picklescan library. picklescan is designed to detect malicious pickle files by checking for the use of dangerous functions. However, in versions prior to 0.0.29, its blacklist was incomplete and did not include several dangerous functions from Python's standard library, including idlelib.calltip.Calltip.fetch_tip and idlelib.calltip.get_entity.
The core of the vulnerability is that these idlelib functions internally use eval() on their arguments, which is a well-known security risk as it allows for arbitrary code execution. An attacker can craft a pickle file that, upon being loaded, executes one of these functions with a malicious payload. Because vulnerable versions of picklescan do not recognize these functions as a threat, they would incorrectly certify the malicious file as safe.
An unsuspecting user, relying on picklescan's assessment, would then load the pickle file, triggering the payload and leading to remote code execution. The provided patch resolves this vulnerability by updating picklescan's dangerous_globals list in src/picklescan/scanner.py to include the newly identified dangerous functions from idlelib.calltip and other modules, thus ensuring they are correctly detected and flagged.