PickleBall: Secure Deserialization of Pickle-based Machine Learning Models (Extended Report)
Andreas D. Kellas, Neophytos Christou, Wenxin Jiang, Penghui Li, Laurent Simon, Yaniv David, Vasileios P. Kemerlis, James C. Davis, Junfeng Yang

TL;DR
PickleBall is a tool that enables secure deserialization of pickle-based machine learning models by analyzing source code and enforcing safe load policies, effectively preventing malicious model execution while maintaining high compatibility.
Contribution
It introduces a static and dynamic analysis framework that generates and enforces custom safe load policies for pickle models, addressing security gaps in existing methods.
Findings
Correctly loads 79.8% of benign models
Rejects 100% of malicious models in dataset
Outperforms existing scanners and loaders
Abstract
Machine learning model repositories such as the Hugging Face Model Hub facilitate model exchanges. However, bad actors can deliver malware through compromised models. Existing defenses such as safer model formats, restrictive (but inflexible) loading policies, and model scanners have shortcomings: 44.9% of popular models on Hugging Face still use the insecure pickle format, 15% of these cannot be loaded by restrictive loading policies, and model scanners have both false positives and false negatives. Pickle remains the de facto standard for model exchange, and the ML community lacks a tool that offers transparent safe loading. We present PickleBall to help machine learning engineers load pickle-based models safely. PickleBall statically analyzes the source code of a given machine learning library and computes a custom policy that specifies a safe load-time behavior for benign models.…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdversarial Robustness in Machine Learning · Explainable Artificial Intelligence (XAI) · Scientific Computing and Data Management
