Downloads · 30 days
0
celvexgroup/modelscan-legacy-pytorch-scan-truncation-poc
modelscan-legacy-pytorch-scan-truncation-poc is a machine learning model from celvexgroup. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Coordinated-disclosure proof-of-concept for Protect AI modelscan, submitted via huntr (Model File Vulnerability).
Downloads · 30 days
0
Access
Public
Updated Jul 1, 2026
Repo size
1.6 KB
Likes
0
Public
Click a slice to open those files.
.md1.6 KB · 34%
From the Hugging Face model README
Coordinated-disclosure proof-of-concept for Protect AI modelscan, submitted via huntr (Model File Vulnerability).
modelscan's scan_pytorch scans a legacy (non-zip) PyTorch file with multiple_pickles=False
from offset 0, so it disassembles only the first of the file's four concatenated pickles
(the MAGIC_NUMBER long, which has no globals) and stops — the payload pickle (segment #4)
is never inspected. So a malicious legacy .pt/.bin/.pth/.ckpt scans clean yet runs
code on torch.load(..., weights_only=False).
Both files below carry the identical benign payload:
evil_legacy.pt — torch.save(..., _use_new_zipfile_serialization=False) → modelscan: No issues found (the bypass)evil_zip.pt — torch.save(..., _use_new_zipfile_serialization=True) → modelscan: CRITICAL posix.system (control)pip install torch modelscan
modelscan -p evil_legacy.pt # -> No issues found (bypass)
modelscan -p evil_zip.pt # -> CRITICAL posix.system (same payload, caught in zip format)
The control proves modelscan detects the exact same payload when the format routes it through
PickleUnsafeOpScan, but misses it in the legacy format.
Strictly benign: the payload's __reduce__ only runs os.system("echo CELVEX-MFV-MARKER > /tmp/…")
— it writes a harmless marker string. No weaponization. Confirmed against released modelscan 0.8.8, torch 2.12.1.