YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Security PoC β€” torch.package model-scanner evasion (huntr MFV)

This is a security-research proof-of-concept for a huntr Model File Vulnerabilities (MFV) submission. It is not malware β€” the payload only writes a harmless marker to /tmp (echo/id). Do not modify to run real commands.

What it demonstrates

Loading malicious_pkgmod.pt with the default torch.package.PackageImporter(...).load_pickle() API executes code, while modelscan and picklescan scan the file and report no issues β€” a model-scanner false-negative. The malicious logic lives in packaged module source (benignmod.py), executed via find_class β†’ import_module β†’ compile(..., "exec"); the embedded pickle carries no dangerous opcodes (GLOBAL benignmod.Widget + STOP).

Environment

pip install torch==2.13.0 modelscan==0.8.8 picklescan==1.0.4   # Python 3.10+

Reproduce

# scanners report CLEAN even though they scan the embedded pickle
modelscan  -p malicious_pkgmod.pt      # -> "No issues found! πŸŽ‰"
picklescan -p malicious_pkgmod.pt      # -> "Infected files: 0, Dangerous globals: 0"

# default-API load executes code
rm -f /tmp/huntr_pkgmod_pwned
python load_pkgmod.py                   # -> marker: True  pwned-pkgmod-<user>
cat /tmp/huntr_pkgmod_pwned

Control: the naive __reduce__/posix.system variant of the same archive is flagged CRITICAL by both scanners β€” proving the evasion is specific to the module-source technique, not an unsupported-format skip.

Files: malicious_pkgmod.pt (PoC), build_malicious_pkgmod.py (craft), load_pkgmod.py (loader), ref_interned.pt (benign reference).

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support