PT-2026-50469 · Meta+1 · Pytorch+1
CVSS v4.0
7.1
High
| Vector | AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
Name of the Vulnerable Software and Affected Versions
picklescan versions prior to 1.0.3
Description
A scanning bypass exists in the
scan pytorch() function. The issue arises from a difference in how magic numbers are handled compared to PyTorch's implementation. While the software uses pickletools.genops(data) to identify magic numbers of INT or LONG types, PyTorch uses pickle module.load(). Attackers can exploit this by using the reduce method to embed malicious magic numbers via dynamic eval, making them undetectable to the scanner while remaining executable. This allows crafted PyTorch payloads to evade detection and achieve arbitrary code execution when loaded using torch.load().Recommendations
Update to version 1.0.3 or later.
As a temporary workaround, restrict the use of the
scan pytorch() function until the update is applied.Exploit
Fix
Eval Injection
Incomplete List of Disallowed Inputs
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Pytorch
Picklescan