[2602.19818] SafePickle: Robust and Generic ML Detection of Malicious Pickle-based ML Models

[2602.19818] SafePickle: Robust and Generic ML Detection of Malicious Pickle-based ML Models

arXiv - AI 4 min read Article

Summary

The paper presents SafePickle, a machine-learning-based scanner designed to detect malicious Pickle-based ML models, achieving a high F1-score and demonstrating effectiveness against evasive attacks.

Why It Matters

As machine learning models serialized with Python's pickle format become more widespread, the risk of remote code execution (RCE) increases. SafePickle addresses this vulnerability by providing a robust detection mechanism that does not rely on complex setups, making it a significant advancement in AI safety and security.

Key Takeaways

  • SafePickle offers a lightweight solution for detecting malicious Pickle files without complex policy generation.
  • The method achieves a 90.01% F1-score, outperforming existing state-of-the-art scanners.
  • SafePickle is library-agnostic, enhancing its applicability across various ML frameworks.
  • The approach effectively identifies evasive malicious models that other scanners fail to detect.
  • A labeled dataset of 727 Pickle files was constructed to support the research and evaluation.

Computer Science > Cryptography and Security arXiv:2602.19818 (cs) [Submitted on 23 Feb 2026] Title:SafePickle: Robust and Generic ML Detection of Malicious Pickle-based ML Models Authors:Hillel Ohayon, Daniel Gilkarov, Ran Dubin View a PDF of the paper titled SafePickle: Robust and Generic ML Detection of Malicious Pickle-based ML Models, by Hillel Ohayon and Daniel Gilkarov and Ran Dubin View PDF HTML (experimental) Abstract:Model repositories such as Hugging Face increasingly distribute machine learning artifacts serialized with Python's pickle format, exposing users to remote code execution (RCE) risks during model loading. Recent defenses, such as PickleBall, rely on per-library policy synthesis that requires complex system setups and verified benign models, which limits scalability and generalization. In this work, we propose a lightweight, machine-learning-based scanner that detects malicious Pickle-based files without policy generation or code instrumentation. Our approach statically extracts structural and semantic features from Pickle bytecode and applies supervised and unsupervised models to classify files as benign or malicious. We construct and release a labeled dataset of 727 Pickle-based files from Hugging Face and evaluate our models on four datasets: our own, PickleBall (out-of-distribution), Hide-and-Seek (9 advanced evasive malicious models), and synthetic joblib files. Our method achieves 90.01% F1-score compared with 7.23%-62.75% achieved by the SOTA s...

Related Articles

[2603.25112] Do LLMs Know What They Know? Measuring Metacognitive Efficiency with Signal Detection Theory
Llms

[2603.25112] Do LLMs Know What They Know? Measuring Metacognitive Efficiency with Signal Detection Theory

Abstract page for arXiv paper 2603.25112: Do LLMs Know What They Know? Measuring Metacognitive Efficiency with Signal Detection Theory

arXiv - AI · 4 min ·
[2603.24772] Evaluating Fine-Tuned LLM Model For Medical Transcription With Small Low-Resource Languages Validated Dataset
Llms

[2603.24772] Evaluating Fine-Tuned LLM Model For Medical Transcription With Small Low-Resource Languages Validated Dataset

Abstract page for arXiv paper 2603.24772: Evaluating Fine-Tuned LLM Model For Medical Transcription With Small Low-Resource Languages Val...

arXiv - Machine Learning · 4 min ·
[2603.25325] How Pruning Reshapes Features: Sparse Autoencoder Analysis of Weight-Pruned Language Models
Llms

[2603.25325] How Pruning Reshapes Features: Sparse Autoencoder Analysis of Weight-Pruned Language Models

Abstract page for arXiv paper 2603.25325: How Pruning Reshapes Features: Sparse Autoencoder Analysis of Weight-Pruned Language Models

arXiv - AI · 4 min ·
Liberate your OpenClaw
Open Source Ai

Liberate your OpenClaw

We’re on a journey to advance and democratize artificial intelligence through open source and open science.

Hugging Face Blog · 3 min ·
More in Open Source Ai: This Week Guide Trending

No comments

No comments yet. Be the first to comment!

Stay updated with AI News

Get the latest news, tools, and insights delivered to your inbox.

Daily or weekly digest • Unsubscribe anytime