Downloads · 30 days
0
liamramsey/modelscan-dill-bypass-poc
modelscan-dill-bypass-poc is a machine learning model from liamramsey. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Security research PoC for the huntr.com Model File Format bounty program. Benign marker payload only (writes /tmp/POCPWNEDdillbypass). No destructive or network behavior.
Downloads · 30 days
0
Access
Public
Updated Jun 3, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py1.6 KB · 34%
From the Hugging Face model README
Security research PoC for the huntr.com Model File Format bounty program.
Benign marker payload only (writes /tmp/POC_PWNED_dill_bypass). No destructive or network behavior.
model_bypass.dill achieves arbitrary code execution on dill.load() while Protect AI ModelScan
(tested v0.8.6) reports "No issues found!". The execution is routed through dill's own
dill._dill._create_function / _create_code reconstructors, which are not on ModelScan's
unsafe_globals denylist. The dangerous call lives inside a reconstructed code object's bytecode
(as a co_name), which the scanner never disassembles.
pip install dill==0.4.1 modelscan==0.8.6
# 1) it executes on load:
python -c "import dill; dill.load(open('model_bypass.dill','rb')); print(open('/tmp/POC_PWNED_dill_bypass').read())"
# -> prints PWNED_DILL_BYPASS...
# 2) but the scanner says clean:
modelscan -p model_bypass.dill # -> "No issues found!"
An equivalent dill file using os.system IS flagged CRITICAL by ModelScan.
See build_bypass.py for construction details.