Malicious Machine Learning Models Discovered on Hugging Face: Report

Cybersecurity researchers found that malware was being distributed on Hugging Face by abusing Pickle file serialisation.

Advertisement
Written by Akash Dutta, Edited by Siddharth Suvarna | Updated: 10 February 2025 18:49 IST
Highlights
  • The malicious code in these ML models is called “nullifAl”
  • Hugging Face has removed the ML models after it was reported
  • The malicious ML models were stored in PyTorch format

Pickle is a Python module used for serialising and deserialising ML model data

Photo Credit: Hugging Face

Hugging Face, the artificial intelligence (AI) and machine learning (ML) hub, is said to contain malicious ML models. A cybersecurity research firm discovered two such models that contain code that can be used to package and distribute malware to those who download these files. As per the researchers, threat actors are using a hard-to-detect method, dubbed Pickle file serialisation, to insert malicious software. The researchers claimed to have reported the malicious ML models, and Hugging Face has removed them from the platform.

Researchers Discover Malicious ML Models in Hugging Face

ReversingLabs, a cybersecurity research firm, discovered the malicious ML models and detailed the new exploit being used by threat actors on Hugging Face. Notably, a large number of developers and companies host open-source AI models on the platform that can be downloaded and used by others.

The firm discovered that the modus operandi of the exploit involves using Pickle file serialisation. For the unaware, ML models are stored in a variety of data serialisation formats, which can be shared and reused. Pickle is a Python module that is used for serialising and deserialising ML model data. It is generally considered an unsafe data format as Python code can be executed during the deserialisation process.

Advertisement

In closed platforms, Pickle files have access to limited data that comes from trusted sources. However, since Hugging Face is an open-source platform, these files are used broadly allowing attackers to abuse the system to hide malware payloads.

Advertisement

During the investigation, the firm found two models on Hugging Face that contained malicious code. However, these ML models were said to escape the platform's security measures and were not flagged as unsafe. The researchers named the technique of inserting malware “nullifAI” as “it involves evading existing protections in the AI community for an ML model.”

These models were stored in PyTorch format, which is essentially a compressed Pickle file. The researchers found that the models were compressed using the 7z format which prevented them from being loaded using PyTorch's “torch.load()” function. This compression also prevented Hugging Face's Picklescan tool from detecting the malware.

Advertisement

The researchers claimed that this exploit can be dangerous as unsuspecting developers who download these models will unknowingly end up installing the malware on their devices. The cybersecurity firm reported the issue to the Hugging Face security team on January 20 and claimed that the models were removed in less than 24 hours. Additionally, the platform is said to have made changes to the Picklescan tool to better identify such threats in “broken' Pickle files.

 

For details of the latest launches and news from Samsung, Xiaomi, Realme, OnePlus, Oppo and other companies at the Mobile World Congress in Barcelona, visit our MWC 2025 hub.

Advertisement

Related Stories

Popular Mobile Brands
  1. Realme Narzo Power 5G With 10,001mAh Battery Launched in India: Price, Specifications
  2. Nothing Phone 4a Pro Teaser Hints at the Presence of This Phone 3 Feature
  3. iPhone 17e vs iPhone 17: Price in India, Features, Specifications Compared
  4. Moto Watch Review: The Best Smartwatch Under Rs. 6,000 in 2026?
  5. Infinix Note 60 Ultra With Pininfarina Design Launched at MWC 2026
  6. MacBook Neo Launched in India With 13-Inch Display, A18 Pro Chip: See Price
  7. Vivo T5x 5G AnTuTu Score Exceeds 1 Million Points, Will Launch in India Soon
  8. Vivo V70 FE Colour Options, Key Features Revealed Ahead of March 9 Launch
  9. Vivo X300 FE Launched as Global Version of This Chinese Smartphone
  10. OnePlus 15T Confirmed to Launch With a Larger Battery, Faster Charging
  1. Granny OTT Release Date: When and Where to Watch the Village Mystery Thriller Online?
  2. Andhaka OTT Release: Where to Watch the Telugu Drama-Thriller Online?
  3. Pookie OTT Release: When and Where to Watch Vijay Antony’s Romantic Drama Online?
  4. Samsung Patent Hints at Potential Clamshell-Style Foldable With Two Cover Displays
  5. Google Introduces Gemini 3.1 Flash-Lite as Its Fastest and Most Cost-Efficient AI Model
  6. Oppo Find N6 Key Features, Colour Options Leaked Ahead of Imminent China Launch
  7. Honor 600 Lite Launched With MediaTek Dimensity 7100 Elite, 6,520mAh Battery: Price, Specifications
  8. Vivo T5x 5G Teased to Launch in India Soon; Company Says AnTuTu Score Exceeds 1 Million Points
  9. MWC 2026: Oppo, MediaTek Join Hands to Showcase New On-Device AI Capabilities for Future Smartphones
  10. Lava Bold 2 5G India Launch Teased; Company Teases Design Ahead of Debut
Download Our Apps
Available in Hindi
© Copyright Red Pixels Ventures Limited 2026. All rights reserved.