Downloads · 30 days
0
liamramsey/modelscan-npz-bypass-poc
modelscan-npz-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/POCPWNEDnpzbypass). No destructive or network behavior.
Downloads · 30 days
0
Access
Public
Updated Jun 3, 2026
Repo size
918 B
Likes
0
Public
Click a slice to open those files.
Other1.5 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_npz_bypass). No destructive or network behavior.
bypass.npz is a numpy .npz archive whose pickle payload is stored in a zip member named
weights (no .npy extension). numpy.load(..., allow_pickle=True) still unpickles that member
on access and executes arbitrary code — but Protect AI ModelScan (tested v0.8.6) tags zip members by
file extension, never assigns the weights member the NUMPY format, and reports "No issues found!".
pip install numpy==2.0.2 modelscan==0.8.6
# 1) it executes on load:
python -c "import numpy as np; np.load('bypass.npz', allow_pickle=True)['weights']; print(open('/tmp/POC_PWNED_npz_bypass').read())"
# -> prints BYPASS_PWNED_<n>
# 2) but the scanner says clean:
modelscan -p bypass.npz # -> "No issues found!"
modelscan -p bypass.npz --show-skipped # -> "bypass.npz:weights ... Model Scan did not scan file"
A .npz with the same payload in a member named config.npy IS flagged CRITICAL by ModelScan.
See build_bypass.py for how the file was constructed.