Modelscan Bypass PoC β shutil.rmtree() Destructive Delete
Vulnerability
Modelscan 0.7.6 fails to detect malicious pickle files that use shutil.rmtree for Destructive file deletion β can delete entire project directories, databases, or system files. DoS via data destruction.
The shutil module is not in modelscan's unsafe_globals blocklist.
Chain
shutil.rmtree(path)β not blocked\n2. Recursively deletes entire directory trees
Reproduction
modelscan scan -p pytorch_model.bin
# Result: "No issues found"
python3 -c "import pickle; result = pickle.loads(open('pytorch_model.bin','rb').read()); print(result)"
# Result: Deletes entire directory tree recursively
Impact
Destructive file deletion β can delete entire project directories, databases, or system files. DoS via data destruction. Severity: CRITICAL.
Modelscan Version
0.7.6 (latest on PyPI as of 2026-04-09)
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support