The vulnerability lies in picklescan's failure to detect malicious code that uses the idlelib.autocomplete.AutoComplete.get_entity function. picklescan operates by checking for known dangerous "globals" (functions/classes) within a pickle file. The vulnerability was that this list of dangerous globals was incomplete. The patch, found in commit aecd11be98702caa9ba9b12189d91ad596a36114, rectifies this by adding idlelib.autocomplete.AutoComplete.get_entity and other similar functions to the dangerous_globals dictionary in src/picklescan/scanner.py.
The functions that use this dictionary for scanning are the ones considered vulnerable. Based on the test files, these are scan_file_path and scan_pickle_bytes. When these functions are called on a malicious pickle file containing the AutoComplete.get_entity payload, they would fail to identify it as a threat prior to the patch.
Therefore, during a security scan using a vulnerable version of picklescan, these functions would appear in a runtime profile, but they would not raise any security alerts for the specific payload, effectively bypassing the scanner. The exploitation of the malicious pickle itself happens later when pickle.load() is called by the end-user application, which in turn executes idlelib.autocomplete.AutoComplete.get_entity. The vulnerability in picklescan is the failure of its scanning functions to prevent this.