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
    • AI 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-2026-31238

CVE-2026-31238: Ludwig Framework RCE Vulnerability

CVE-2026-31238 is a remote code execution flaw in Ludwig framework through version 0.10.4 caused by insecure deserialization. Attackers can execute arbitrary code via malicious model files. This article covers technical details, affected versions, impact, and mitigation steps.

Published: May 17, 2026

CVE-2026-31238 Overview

CVE-2026-31238 is an insecure deserialization vulnerability [CWE-502] in the Ludwig machine learning framework through version 0.10.4. The flaw resides in the model serving component invoked by the ludwig serve command. Ludwig loads model weight files using PyTorch's torch.load() function without setting the weights_only=True parameter. This default behavior allows arbitrary Python objects to be deserialized through the pickle module. An attacker who supplies a crafted PyTorch model file can achieve arbitrary code execution on the host running the Ludwig model server.

Critical Impact

Remote attackers can execute arbitrary code on Ludwig model servers by providing a malicious model file, with no authentication or user interaction required.

Affected Products

  • Ludwig framework versions up to and including 0.10.4
  • Ludwig model serving component (ludwig serve)
  • Deployments using PyTorch model weight loading via torch.load()

Discovery Timeline

  • 2026-05-12 - CVE-2026-31238 published to NVD
  • 2026-05-14 - Last updated in NVD database

Technical Details for CVE-2026-31238

Vulnerability Analysis

The vulnerability stems from unsafe use of PyTorch's serialization API inside the Ludwig model serving pipeline. When a user starts a model server with ludwig serve, the framework loads model weight files from disk using torch.load(). The function defaults to full pickle-based deserialization unless weights_only=True is explicitly passed.

Pickle deserialization in Python can invoke arbitrary callables through the __reduce__ mechanism. A maliciously crafted model file can therefore embed Python objects whose reconstruction triggers shell commands, network connections, or arbitrary library calls. The Ludwig serving process executes this code with the privileges of the user running the server.

Because Ludwig is commonly deployed in machine learning operations pipelines, affected hosts often hold training data, credentials for cloud object storage, and access to internal model registries. Successful exploitation gives an attacker a foothold inside the ML infrastructure.

Root Cause

The root cause is the absence of the weights_only=True argument in torch.load() calls within the model serving code path. PyTorch added the weights_only parameter specifically to restrict deserialization to tensors and primitive types, blocking arbitrary object reconstruction. Ludwig does not enable this safe mode, leaving pickle deserialization fully active for any model artifact loaded at serving time.

Attack Vector

The attack vector is network reachable through any workflow that causes the Ludwig server to load an attacker-controlled model file. This includes shared model registries, public model repositories, supply chain injection into MLOps pipelines, and any feature that downloads or accepts model artifacts from remote sources. No prior authentication to the server is required when the loading path consumes external artifacts.

The vulnerability is described in prose only. See the GitHub Ludwig Repository and the Notion CVE-2026-31238 Details for additional technical context.

Detection Methods for CVE-2026-31238

Indicators of Compromise

  • Unexpected child processes spawned by the Ludwig server process during model load, such as sh, bash, python, or curl.
  • Outbound network connections from the Ludwig serving host to unknown external addresses shortly after a model is loaded.
  • New or modified files in user home directories, cron locations, or SSH authorized_keys following a ludwig serve invocation.
  • Model artifact files arriving from untrusted sources or with modification timestamps inconsistent with the training pipeline.

Detection Strategies

  • Monitor process trees for the Ludwig serving process and alert on any non-Python child processes that execute system utilities or shells.
  • Inspect PyTorch model files for embedded pickle opcodes referencing dangerous globals such as os.system, subprocess, eval, or exec before deployment.
  • Apply behavioral analytics that correlate model file ingestion events with subsequent process and network activity on the same host.

Monitoring Recommendations

  • Forward process execution, file integrity, and network telemetry from ML serving hosts to a centralized analytics pipeline.
  • Track outbound traffic from inference servers and baseline expected destinations to flag anomalous egress.
  • Audit model registry pulls and record which model hashes are loaded by each ludwig serve instance.

How to Mitigate CVE-2026-31238

Immediate Actions Required

  • Restrict ludwig serve to load only model artifacts produced by trusted, authenticated build pipelines.
  • Isolate Ludwig serving hosts in network segments without access to sensitive credentials or production data stores.
  • Remove untrusted model files from shared storage and rotate any credentials accessible to compromised serving hosts.

Patch Information

No fixed version is referenced in the published advisory at the time of writing. Track the GitHub Ludwig Repository for an updated release that enables weights_only=True in the model serving code path, and upgrade once available.

Workarounds

  • Run ludwig serve only against model files generated and stored within trusted infrastructure with cryptographic integrity checks.
  • Execute the Ludwig server as a low-privilege user inside a container or sandbox with restricted filesystem and network access.
  • Apply egress filtering to block outbound connections from serving hosts to destinations outside the approved allowlist.
  • For internal forks, patch torch.load() call sites to pass weights_only=True and reject any model file that requires legacy pickle loading.
bash
# Configuration example: run ludwig serve as an unprivileged user inside an isolated container
docker run --rm \
  --user 10001:10001 \
  --read-only \
  --cap-drop=ALL \
  --network=ludwig-isolated \
  -v /trusted/models:/models:ro \
  ludwig-ai/ludwig:latest \
  serve --model_path /models/verified_model

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechLudwig

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.07%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-502
  • Technical References
  • GitHub Ludwig Repository

  • Notion CVE-2026-31238 Details
  • Related CVEs
  • CVE-2026-31237: Ludwig Framework RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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