Archive of AI

Source Snapshot / 2024-02-27-huggingface-jfrog-100-malicious-pickle-models-1

Examining Malicious Hugging Face ML Models with Silent Backdoor

Linked event: 2024-02-27 · JFrog Exposes Roughly 100 Malicious Pickle Models on Hugging Face Triggering Reverse-Shell Backdoors Upon Loading

Publisher
JFrog
Archived
2026-11-23
Capture Method
Direct page capture
HTTP / SHA-256
200 / 565868d27bc420f4
Original URL
Open source ↗
Wayback Backup
Not archived
This page preserves a plain-text static snapshot against link rot. When citing figures, tables, or full legal terms, verify against the original URL and Wayback Machine archive.

JFrog Academy

JFrog Certifications

Webinars & Workshops

Software Supply Chain Topics

Resource Center

Customer Stories

Security Research

State of the Union Report

Gartner MQ: Supply Chain Security

Support & Services

Customer Success

DevOps Consulting Services

Manage & Troubleshoot

Account & Trust

JFrog Documentation

Cloud Status

JFrog Partner Ecosystem

Discover our network of channel, technology, and cloud partners.

Channel Partner Finder

Connect with a JFrog Channel Partner in your region.

MyJFrog for Partners

Manage subscriptions, monitor usage, and track customer renewals.

Check out JFrog’s community, review expert resources, get latest community news, and more

Documentation

See the latest product documentation, research JFrog offerings and get answers on how to configure and use JFrog products

Integrations

Learn how to integrate JFrog products with 100+ providers such as ServiceNow, GitHub, NVIDIA, Sonar and more

Open a ticket, get assistance or search for answers with JFrog Support and FAQs.

JFrog immunizes what agents consume and controls how they build and deploy — every AI model, agent skill, plugin, MCP server, package, and AI-generated artifact, governed in a single source of truth.Run with a trusted agentic workforce.

JFrog AI Security

Secure the AI Assets Your Agents Consume

JFrog Agent Plugin

AI Asset Registries

AI Asset Scanning

AI Integrations

Hugging Face

Visual Studio Code

See all integrations

AI Resources

The Agentic Development Security Discipline

Automated Remediation

Managing Agent Primitives Like Software Artifacts

Access JFrog with AI Agents

AI Assets Under Control: Enforcing Policies on your Coding Agents

See More Resources

Agentic Development

Save Tokens, Maximize Context for Coding Agents.

Connect Coding Agents Natively to Your JFrog Platform.

Supply Chain Solutions

The universal and adaptable JFrog Platform solves essential cross-industry agentic software supply chain challenges.

Artifact Management

Self-Healing Software Supply Chain

Software Supply Chain Governance

Artifact Data Retention

Global Enterprise Scale

Trusted Agentic Workforce

ECOSYSTEM INTEGRATIONS

Build on a universal platform that gives you freedom of choice across your AI and software supply chain.

See all Integrations

Accelerate software delivery while meeting strict regulatory standards like HIPAA and FedRAMP

Financial Services

Public Sector

REGULATION & COMPLIANCE COVERAGE

Build a continuous audit trail for CRA, DORA, NIST SSDF, and CERT-In compliance.

EU Cyber Resiliance Act (CRA)

The JFrog Platform

The Single Source of Truth for the Agentic Software Supply Chain.The infrastructure that establishes, enforces, and tracks trust in your software. Uniting DevOps, DevSecOps, DevGovOps, and AI Security on a single source of truth.Trust your speed. Adapt without losing control.

View Platform

JFrog Artifactory

Universal AI Asset & Artifact Management

JFrog Distribution

Secure Distribution Across Consumption Points

JFrog Connect

IoT Device Management with DevOps Agility

JFrog Curation

Policy-driven curation of software & AI components

JFrog Xray (SCA)

Integrated SCA for Software & AI Artifacts

Zero-Touch Remediation

Automatically Fix Risks at the Speed of Frontier AI

JFrog Advanced Security

Supply Chain Exposure Scanning & Impact Analysis

Contextual Analysis

Secrets Detection

Infrastructure as Code

Runtime Integrity

Agent Guard NEW

Shadow AI Detection

JFrog AppTrust

Continuous governance and compliance

OOTB Compliance Frameworks NEW

Policy-as-Code Playground NEW

Post-Release Governance NEW

Prompt-to-Release Traceability NEW

Data Scientists Targeted by Malicious Hugging Face ML Models with Silent Backdoor

David Cohen, JFrog Senior Security Researcher

February 27, 2024

In the realm of AI collaboration, Hugging Face reigns supreme. But could it be the target of model-based attacks? Recent JFrog findings suggest a concerning possibility, prompting a closer look at the platform’s security and signaling a new era of caution in AI research.

The discussion on AI Machine Language (ML) models security is still not widespread enough, and this blog post aims to broaden the conversation around the topic. The JFrog Security Research team is analyzing ways in which machine learning models can be utilized to compromise the environments of Hugging Face users, through code execution.

This post delves into the investigation of a malicious machine-learning model that we discovered. As with other open-source repositories, we’ve been regularly monitoring and scanning AI models uploaded by users, and have discovered a model whose loading leads to code execution, after loading a pickle file. The model’s payload grants the attacker a shell on the compromised machine, enabling them to gain full control over victims’ machines through what is commonly referred to as a “backdoor”. This silent infiltration could potentially grant access to critical internal systems and pave the way for large-scale data breaches or even corporate espionage, impacting not just individual users but potentially entire organizations across the globe, all while leaving victims utterly unaware of their compromised state. A detailed explanation of the attack mechanism is provided, shedding light on its intricacies and potential ramifications. As we unravel the intricacies of this nefarious scheme, let’s keep in mind what we can learn from the attack, the attacker’s intentions, and their identity.

As with any technology, AI models can also pose security risks if not handled properly. One of the potential threats is code execution, which means that a malicious actor can run arbitrary code on the machine that loads or runs the model. This can lead to data breaches, system compromise, or other malicious actions.

How can loading an ML model lead to code execution?

Code execution can happen when loading certain types of ML models (see table below) from an untrusted source. For example, some models use the “pickle” format, which is a common format for serializing Python objects. However, pickle files can also contain arbitrary code that is executed when the file is loaded.

ML Model Types and Their Code Execution Capabilities [based on] (Click to expand)

Hugging Face security

Hugging Face is a platform where the machine-learning community collaborates on models, datasets, and applications. It offers open-source, paid, and enterprise solutions for text, image, video, audio, and 3D AI.

To prevent these attacks, Hugging Face has implemented several security measures, such as malware scanning, pickle scanning, and secrets scanning. These features scan every file of the repositories for malicious code, unsafe deserialization, or sensitive information, and alert the users or the moderators accordingly. Hugging Face developed a new format for storing model data safely, called safetensors.

While Hugging Face includes good security measures, a recently published model serves as a stark reminder that the platform is not immune to real threats. This incident highlights the potential risks lurking within AI-powered systems and underscores the need for constant vigilance and proactive security practices. Before diving in, let’s take a closer look at the current research landscape at JFrog.

Deeper Analysis Required to Identify Real Threats

HuggingFace Warning for Detected Unsafe Models via Pickle Scanning

[...内容已截断,完整版请查看原文或 Wayback 快照]