Skip to content
Submit incident
AII-1002-65663
Well documentedThree or more independent publishers report the core facts.

Malicious AI models bypass Hugging Face security scanning via novel Pickle compression technique

Researchers at Reversing Labs discovered two malicious machine learning models on Hugging Face that evaded the platform's Picklescan security tool by using 7z compression instead of the standard ZIP format for PyTorch files. The models exploited a novel "nullifAI" technique that prevents detection of dangerous Pickle serialization code during deserialization.

6 February 2025 Β· Hugging Face Β· Security and cyberattacks
6 February 2025
AII-1002-656636 sources ↓
Quick facts
Category
Security and cyberattacks
Source
CyberScoop
Date
6 February 2025
Drafted by
Raidu Incident Detection

What happened

Researchers at Reversing Labs discovered two malicious machine learning models available on Hugging Face that were not flagged as unsafe by the platform's security scanning mechanisms.

The malicious models exploited a novel attack technique by abusing Pickle file serialization in PyTorch format compressed using 7z instead of the standard ZIP format, preventing detection by Picklescan.

The two models used broken Pickle files, suggesting they were proof-of-concept models for testing a novel attack method rather than actual functional malicious ones.

Reported impact

Pickle files pose inherent security risks because they allow Python code to execute during deserialization, and on open ML platforms like Hugging Face where collaboration is prioritized, developers often prioritize ease of use over security.

Index analysis

Reversing Labs researchers identified shortcomings in Hugging Face's Picklescan detection tool, which relies on a blacklist of dangerous functionsβ€”a basic security feature that is not scalable or adaptable as known threats morph and new threats emerge.

Picklescan demonstrated an inability to properly scan broken Pickle files and could not detect models compressed using non-standard formats outside its expected ZIP compression scheme.

Governance controls

Hugging Face operates Picklescan to detect malicious models, but the tool's blacklist-based approach has proven insufficient to identify sophisticated evasion techniques.

Classification

Category
Security and cyberattacks
Industry
Digital security
Harm status
Potential harm
Intent
Intentional
Timing
Post-deployment
Harm types
Public interest
Consequences
None recorded
AI systems
Picklescan

Sources and evidence

This record was researched and written by the Index, based on the following original reporting.

CyberScoop
Hugging Face platform continues to be plagued by vulnerable 'pickles'
6 February 2025
ReversingLabs
Malicious ML models discovered on Hugging Face platform
6 February 2025
Infosecurity Magazine
Malicious AI Models on Hugging Face Exploit Novel Attack Technique
7 February 2025
IT Security News - cybersecurity, infosecurity news
Developers Beware! Malicious ML Models Found on Hugging Face Platform - IT Security News
7 February 2025
WinBuzzer
Malicious Code Found in AI Models Shared on Hugging Face - WinBuzzer
9 February 2025
Gadgets 360
Malicious Machine Learning Models Discovered on Hugging Face: Report
10 February 2025