The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2024-3568

CVE-2024-3568: Huggingface Transformers RCE Vulnerability

CVE-2024-3568 is a remote code execution vulnerability in Huggingface Transformers caused by unsafe deserialization in load_repo_checkpoint(). This article covers technical details, affected versions, impact, and mitigation.

Published: April 8, 2026

CVE-2024-3568 Overview

The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data within the load_repo_checkpoint() function of the TFPreTrainedModel() class. Attackers can execute arbitrary code and commands by crafting a malicious serialized payload, exploiting the use of pickle.load() on data from potentially untrusted sources. This vulnerability allows for remote code execution (RCE) by deceiving victims into loading a seemingly harmless checkpoint during a normal training process, thereby enabling attackers to execute arbitrary code on the targeted machine.

Critical Impact

This vulnerability enables remote code execution through malicious model checkpoints, potentially compromising machine learning environments, training pipelines, and any systems that load untrusted Huggingface Transformers model checkpoints.

Affected Products

  • Huggingface Transformers (all versions prior to the security patch)

Discovery Timeline

  • 2024-04-10 - CVE-2024-3568 published to NVD
  • 2025-10-10 - Last updated in NVD database

Technical Details for CVE-2024-3568

Vulnerability Analysis

This insecure deserialization vulnerability (CWE-502) exists within the load_repo_checkpoint() function of the TFPreTrainedModel() class in the Huggingface Transformers library. The vulnerability stems from the unsafe use of Python's pickle.load() function when loading model checkpoints from potentially untrusted sources.

Python's pickle module is inherently insecure when handling untrusted data because it can execute arbitrary code during the deserialization process. When a user loads a model checkpoint that has been maliciously crafted by an attacker, the pickle deserialization process can trigger code execution without any additional user interaction beyond the initial load operation.

The attack scenario is particularly dangerous in machine learning contexts where researchers and developers frequently download and use pre-trained models from various sources. An attacker could distribute a malicious checkpoint file disguised as a legitimate model, and any user who loads this checkpoint would unknowingly execute the attacker's payload.

Root Cause

The root cause of this vulnerability is the use of Python's pickle.load() function to deserialize checkpoint data without proper validation or sanitization. The pickle module is designed to serialize and deserialize Python objects, but it lacks any security mechanisms to prevent malicious payloads from being executed during deserialization.

When load_repo_checkpoint() processes a checkpoint file, it trusts the serialized data implicitly, allowing attackers to embed arbitrary Python code within the pickle payload. This code executes with the same privileges as the application loading the checkpoint, enabling full system compromise in many scenarios.

Attack Vector

The attack vector is network-based and requires user interaction. An attacker must first create a malicious checkpoint file containing a crafted pickle payload with arbitrary code. The attacker then distributes this checkpoint through various means such as:

  • Uploading to model repositories
  • Sharing through collaborative platforms
  • Distributing via social engineering tactics

When a victim downloads and loads this checkpoint during their normal model training or inference workflow, the malicious payload executes automatically. The attack exploits the trust relationship between machine learning practitioners and shared model resources.

The vulnerability is exploited through crafting a malicious pickle payload that, when deserialized by the load_repo_checkpoint() function, executes arbitrary code. The attack leverages Python's __reduce__ method to embed system commands within the serialized object. When the victim loads what appears to be a legitimate model checkpoint, the embedded code executes with the permissions of the running process. For detailed technical information, see the Huntr Bounty Report.

Detection Methods for CVE-2024-3568

Indicators of Compromise

  • Unexpected system commands or processes spawned during model checkpoint loading operations
  • Network connections initiated immediately after loading model checkpoints from untrusted sources
  • Suspicious modifications to system files or configurations following model loading activities
  • Unusual resource consumption patterns during checkpoint deserialization

Detection Strategies

  • Monitor for calls to pickle.load() or pickle.loads() with data originating from external or untrusted sources
  • Implement file integrity monitoring on checkpoint directories to detect unauthorized modifications
  • Deploy application-level logging for all model loading operations in Transformers-based applications
  • Analyze network traffic for suspicious outbound connections following model loading events

Monitoring Recommendations

  • Implement behavioral analysis to detect anomalous process spawning during ML pipeline operations
  • Configure security tooling to alert on execution of shell commands from Python ML processes
  • Monitor for file system changes in standard checkpoint storage locations
  • Review audit logs for unexpected privilege escalation attempts in ML environments

How to Mitigate CVE-2024-3568

Immediate Actions Required

  • Update the Huggingface Transformers library to the patched version immediately
  • Audit all model checkpoints currently in use for potential compromise
  • Restrict checkpoint loading to verified, trusted sources only
  • Implement network segmentation for ML training environments

Patch Information

Huggingface has released a security patch to address this vulnerability. The fix is available in commit 693667b8ac8138b83f8adb6522ddaf42fa07c125. Organizations should update their Transformers installations to include this commit or any subsequent release containing the fix.

Workarounds

  • Avoid loading model checkpoints from untrusted or unverified sources until patches are applied
  • Implement checkpoint verification mechanisms using cryptographic signatures before loading
  • Run ML training environments in isolated containers or sandboxed environments to limit potential impact
  • Consider using safer serialization alternatives like safetensors where possible
bash
# Update Huggingface Transformers to the latest patched version
pip install --upgrade transformers

# Verify the installation includes the security fix
pip show transformers

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechHuggingface Transformers

  • SeverityCRITICAL

  • CVSS Score9.6

  • EPSS Probability20.07%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-502
  • Technical References
  • Huntr Bounty Report
  • Vendor Resources
  • GitHub Commit Update
  • Related CVEs
  • CVE-2026-1839: HuggingFace Transformers RCE Vulnerability

  • CVE-2024-11392: Huggingface Transformers RCE Vulnerability

  • CVE-2024-11393: Hugging Face Transformers RCE Vulnerability

  • CVE-2024-11394: Hugging Face Transformers RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English