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

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-65663
Quick facts
Category
Security and cyberattacks
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

Sources not yet published

This record was researched and written by the Index from original reporting. Its sources are still being verified by an editor, and they are listed here once that check is complete. Until then the record carries no reviewer.

How sources are verifiedSuggest a source for this incident