YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Picklescan + ModelScan Bypass PoC
This repository contains a proof-of-concept malicious .joblib model file that bypasses both picklescan and ModelScan while achieving arbitrary code execution.
Bypass Technique
Chain: marshal.loads() โ types.FunctionType() โ function() โ RCE
| Scanner | Version | Result |
|---|---|---|
| picklescan | 1.0.3 | Infected: 0, Dangerous: 0 (only "Suspicious") |
| ModelScan | 0.8.7 | No issues found! |
Root Cause
marshalmodule is NOT in picklescan's_unsafe_globalsblocklisttypes.FunctionTypeis NOT blocked (onlytypes.CodeTypeis)marshal.loads()reconstructs code objects โ functionally equivalent to blockedtypes.CodeType()
File
malicious_model.joblibโ Handcrafted pickle bytecode that executesid > /tmp/picklescan_bypass_proof.txton load
Verification
# Scan (passes both scanners)
picklescan -p malicious_model.joblib -g
modelscan -p malicious_model.joblib
# Load (triggers RCE)
python -c "import pickle; pickle.loads(open('malicious_model.joblib','rb').read())"
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support