mlsanityData to 7 Oct 2026

Models Are Codes: Towards Measuring Malicious Code Poisoning Attacks on Pre-trained Model Hubs

arXiv 2409.09368 ↗First posted 14 Sep 2024cs.CR cs.SEcited by 16

Not on the map. Why?

Abstract (arXiv)

The proliferation of pre-trained models (PTMs) and datasets has led to the emergence of centralized model hubs like Hugging Face, which facilitate collaborative development and reuse. However, recent security reports have uncovered vulnerabilities and instances of malicious attacks within these platforms, highlighting growing security concerns. This paper presents the first systematic study of malicious code poisoning attacks on pre-trained model hubs, focusing on the Hugging Face platform. We conduct a comprehensive threat analysis, develop a taxonomy of model formats, and perform root cause analysis of vulnerable formats. While existing tools like Fickling and ModelScan offer some protection, they face limitations in semantic-level analysis and comprehensive threat detection. To address these challenges, we propose MalHug, an end-to-end pipeline tailored for Hugging Face that combines dataset loading script extraction, model deserialization, in-depth taint analysis, and heuristic pattern matching to detect and classify malicious code poisoning attacks in datasets and models. In collaboration with Ant Group, a leading financial technology company, we have implemented and deployed MalHug on a mirrored Hugging Face instance within their infrastructure, where it has been operational for over three months. During this period, MalHug has monitored more than 705K models and 176K datasets, uncovering 91 malicious models and 9 malicious dataset loading scripts. These findings reveal a range of security threats, including reverse shell, browser credential theft, and system reconnaissance. This work not only bridges a critical gap in understanding the security of the PTM supply chain but also provides a practical, industry-tested solution for enhancing the security of pre-trained model hubs.

Key facts. Cited by 16 papers in the map (data through 7 Oct 2026). First posted on arXiv 14 Sep 2024.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 7; 2026: 8.

16 papers.

Sort:

By area:

  1. 2024Large Language Model Supply Chain: Open Problems From the Security Perspectivecited by 9
  2. 2025Enhancing the De-identification of Personally Identifiable Information in Educational Datacited by 7
  3. 2025PickleBall: Secure Deserialization of Pickle-based Machine Learning Models (Extended Report)cited by 3
  4. 2025A Rusty Link in the AI Supply Chain: Detecting Evil Configurations in Model Repositoriescited by 2
  5. 2025On the (In)Security of Loading Machine Learning Modelscited by 2
  6. 2026AgentRAE: Remote Action Execution through Notification-based Visual Backdoors against Screenshots-based Mobile GUI Agentscited by 2
  7. 2025Living Off the LLM: How LLMs Will Change Adversary Tacticscited by 1
  8. 2025Securing the AI Supply Chain: What Can We Learn From Developer-Reported Security Issues and Solutions of AI Projects?cited by 1
  9. 2026SafePickle: Robust and Generic ML Detection of Malicious Pickle-based ML Modelscited by 1
  10. 2025Zero-Trust Artificial Intelligence Model Security Based on Moving Target Defense and Content Disarm and Reconstructioncited by 0
  11. 2026One RNG to Rule Them All: How Randomness Becomes an Attack Vector in Machine Learningcited by 0
  12. 2026BadDLM: Backdooring Diffusion Language Models with Diverse Targetscited by 0
4 more
  1. 2026Toward a Generalized Defense Across Sparse, Continuous, and Structured Parameter Attackscited by 0
  2. 2026Lifecycle-Aware Dynamic Analysis for Secure ML Model Executioncited by 0
  3. 2026Cyber-Capable AI Agents: Vulnerabilities, Evaluation Containment, and Defensive Responsecited by 0
  4. 2026Broken on Arrival: Silently Defective LLM Artifacts in Public Model Registries and How to Catch Themcited by 0