ModelScan Bypass PoC β atexit.register
Security research for responsible disclosure via Huntr MFV program.
Vulnerability
atexit.register is not in modelscan's unsafe_globals blocklist.
When a pickle file containing this global is scanned by modelscan, it reports "No issues found."
However, loading the file with pickle.loads() / torch.load() triggers registers arbitrary callable for deferred execution at interpreter shutdown β can chain with any unblocked callable for code execution.
Impact
- Severity: CRITICAL
- Effect: registers arbitrary callable for deferred execution at interpreter shutdown β can chain with any unblocked callable for code execution
- Bypass class: Module blocklist gap
Reproduction
pip install modelscan
modelscan scan -p bypass_poc.pkl
# Output: "No issues found!"
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support