GHSA-86cj-95qr-2p4f: Picklescan missing detection when calling pytorch function torch._dynamo.guards.GuardBuilder.get
N/A
Basic Information
Technical Details
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| picklescan | pip | <= 0.0.27 | 0.0.28 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability lies in the picklescan library's failure to detect a malicious pickle file that uses torch._dynamo.guards.GuardBuilder.get for remote code execution. The patch, identified by commit 7f994d62084fe43f1cffdef2f9bae6923344ef53, addresses this by updating the _unsafe_globals dictionary in src/picklescan/scanner.py to include "torch._dynamo.guards": {"GuardBuilder.get"}. The function scan_pickle_bytes is the primary function responsible for orchestrating the scan of a pickle file. It utilizes the _unsafe_globals list (via the _build_scan_result_from_raw_globals helper function) to determine if any of the globals used in the pickle are malicious. By not having torch._dynamo.guards.GuardBuilder.get in this list, scan_pickle_bytes would fail to report a malicious pickle using this technique. Therefore, scan_pickle_bytes is the vulnerable function as it's the entry point for the flawed detection logic. The patch ensures that this function, and the overall scan, will now correctly identify this threat.