Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-2023-6940

CVE-2023-6940: Lfprojects MLflow RCE Vulnerability

CVE-2023-6940 is a remote code execution vulnerability in Lfprojects MLflow that enables attackers to execute arbitrary commands through a malicious config download. This article covers technical details, impact, and mitigation.

Published: January 27, 2026

CVE-2023-6940 Overview

CVE-2023-6940 is a Command Injection vulnerability affecting MLflow, the popular open-source machine learning platform maintained by LF Projects. This vulnerability allows attackers to achieve full command execution on a victim's system through a malicious configuration file. With only a single user interaction—downloading a crafted config file—an attacker can gain complete control over the target system, making this a particularly dangerous attack vector for ML practitioners and data scientists.

Critical Impact

Attackers can achieve full command execution on victim systems through a malicious configuration file, requiring only one user interaction to trigger the exploit.

Affected Products

  • LF Projects MLflow (all versions prior to the security patch)
  • MLflow deployments using YAML configuration files with Jinja2 templating
  • Systems that download or process untrusted MLflow configuration files

Discovery Timeline

  • 2023-12-19 - CVE-2023-6940 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2023-6940

Vulnerability Analysis

The vulnerability stems from improper handling of Jinja2 template rendering in MLflow's YAML configuration file processing. MLflow uses Jinja2 templating to allow dynamic configuration files, but prior to the security fix, the templating engine was not properly sandboxed. This allowed attackers to inject malicious Jinja2 templates into configuration files that would execute arbitrary system commands when the configuration was loaded.

The attack requires network access and minimal user interaction (downloading a malicious config file), but requires no authentication or special privileges. When successfully exploited, an attacker can achieve full confidentiality, integrity, and availability impact on the target system.

Root Cause

The root cause is the use of an unsandboxed Jinja2 environment for rendering YAML configuration files. Without proper sandboxing, Jinja2's powerful templating capabilities can be abused to execute arbitrary Python code, which can then be leveraged to run system commands. This is classified as CWE-77 (Improper Neutralization of Special Elements used in a Command - Command Injection).

Attack Vector

The attack vector is network-based, targeting MLflow users who download and load configuration files from untrusted sources. An attacker can craft a malicious YAML configuration file containing embedded Jinja2 templates designed to execute arbitrary commands. When a victim downloads this configuration and MLflow processes it, the malicious templates are rendered using the unsandboxed Jinja2 environment, resulting in command execution with the privileges of the MLflow process.

The security patch addresses this by replacing the standard Jinja2 environment with a SandboxedEnvironment, which restricts the capabilities available within templates:

python
     :param context_name: Name of the context file
     :return: Data in yaml file as dictionary
     """
-    import jinja2
+    from jinja2 import FileSystemLoader, StrictUndefined
+    from jinja2.sandbox import SandboxedEnvironment
 
     template_path = os.path.join(root, template_name)
     context_path = os.path.join(root, context_name)

Source: GitHub Commit

Detection Methods for CVE-2023-6940

Indicators of Compromise

  • Unusual YAML configuration files containing Jinja2 template expressions with suspicious patterns (e.g., {{ config.__class__.__mro__ }}, {{ ''.__class__.__mro__ }})
  • Unexpected child processes spawned from MLflow processes
  • Network connections or file system access from MLflow that deviate from normal behavior
  • Configuration files with obfuscated or encoded content designed to bypass simple inspection

Detection Strategies

  • Monitor MLflow configuration directories for newly created or modified YAML files with embedded template expressions
  • Implement file integrity monitoring on MLflow configuration directories
  • Deploy endpoint detection solutions to identify command injection patterns in configuration file parsing
  • Review MLflow logs for errors related to template rendering that may indicate exploitation attempts

Monitoring Recommendations

  • Enable verbose logging for MLflow to capture configuration file loading events
  • Set up alerts for unusual process execution chains originating from Python/MLflow processes
  • Monitor network traffic for downloads of YAML/configuration files from untrusted sources
  • Implement behavioral analysis to detect post-exploitation activities such as reverse shells or data exfiltration

How to Mitigate CVE-2023-6940

Immediate Actions Required

  • Update MLflow to the latest version that includes the security patch (commit 5139b1087d686fa52e2b087e09da66aff86297b1 or later)
  • Audit all existing MLflow configuration files for suspicious Jinja2 template content
  • Restrict download and execution of configuration files from untrusted sources
  • Implement network segmentation to limit the impact of potential compromise

Patch Information

The vulnerability has been addressed in a security patch committed to the MLflow repository. The fix replaces the standard Jinja2 environment with a sandboxed version (SandboxedEnvironment) that restricts the execution capabilities within templates. Users should update to a version of MLflow that includes this patch. The security fix is available in the MLflow GitHub repository.

Workarounds

  • Only load MLflow configuration files from trusted, verified sources
  • Implement strict access controls on directories where MLflow configuration files are stored
  • Run MLflow processes with minimal system privileges to limit the impact of successful exploitation
  • Consider implementing a configuration file validation layer that rejects files with suspicious template patterns
bash
# Configuration example - Verify MLflow version includes security fix
pip show mlflow | grep -i version
# Update to patched version
pip install --upgrade mlflow
# Audit configuration files for suspicious content
grep -r "{{.*__class__\|{{.*__mro__\|{{.*__subclasses__" /path/to/mlflow/configs/

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechLfprojects Mlflow

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability0.15%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-77
  • Technical References
  • Huntr Bounty Report
  • Vendor Resources
  • GitHub Commit Update
  • Related CVEs
  • CVE-2025-11201: LFProjects MLflow RCE Vulnerability

  • CVE-2025-11200: Lfprojects MLflow Auth Bypass Vulnerability

  • CVE-2025-0453: Lfprojects MLflow DoS Vulnerability

  • CVE-2024-3573: Lfprojects MLflow Path Traversal Flaw
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