PickleBall: Secure Deserialization of Pickle-based Machine Learning Models (Extended Report)
Not on the map. Why?
Abstract (arXiv)
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. PickleBall then dynamically enforces the policy during load time as a drop-in replacement for the pickle module. PickleBall generates policies that correctly load 79.8% of benign pickle-based models in our dataset, while rejecting all (100%) malicious examples in our dataset. In comparison, evaluated model scanners fail to identify known malicious models, and the state-of-art loader loads 22% fewer benign models than PickleBall. PickleBall removes the threat of arbitrary function invocation from malicious pickle-based models, raising the bar for attackers to depend on code reuse techniques.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 14 of its 94 references that are in the map. First posted on arXiv 21 Aug 2025.
Builds on
14 of 94 references.
References · 14
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021Carbon Emissions and Large Neural Network Trainingcited by 567
- 2023LanguageBind: Extending Video-Language Pretraining to N-modality by Language-based Semantic Alignmentcited by 370
- 2021Pre-Trained Models: Past, Present and Futurecited by 319
- 2020Backstabber's Knife Collection: A Review of Open Source Software Supply Chain Attackscited by 61
- 2021AISHELL-4: An Open Source Dataset for Speech Enhancement, Separation, Recognition and Speaker Diarization in Conference Scenariocited by 60
- 2023An Empirical Study of Pre-Trained Model Reuse in the Hugging Face Deep Learning Model Registrycited by 47
- 2022T-NER: An All-Round Python Library for Transformer-based Named Entity Recognitioncited by 37
- 2024Models Are Codes: Towards Measuring Malicious Code Poisoning Attacks on Pre-trained Model Hubscited by 18
- 2024A Large-Scale Exploit Instrumentation Study of AI/ML Supply Chain Attacks in Hugging Face Modelscited by 14
- 2021EvilModel 2.0: Bringing Neural Network Models into Malware Attackscited by 13
- 2024Reusing Deep Learning Models: Challenges and Directions in Software Engineeringcited by 10
2 more
Built on by
Citing papers per year: 2026: 3.
3 papers.