A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-2024-6868

CVE-2024-6868: Mudler LocalAI RCE Vulnerability

CVE-2024-6868 is a remote code execution flaw in Mudler LocalAI version 2.17.1 caused by improper archive extraction. Attackers can exploit tarslip to write files to arbitrary locations. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: May 26, 2026

CVE-2024-6868 Overview

CVE-2024-6868 is an arbitrary file write vulnerability in mudler/LocalAI version 2.17.1. The application automatically extracts archive files (such as .tar) referenced in model configurations after downloading them. Attackers can craft archives containing path traversal entries to write files outside the intended models directory. This technique, known as a tarslip attack, bypasses directory restrictions and enables overwriting backend assets used by the LocalAI server. Overwriting these assets leads to remote code execution (RCE) on the host. The flaw is tracked under [CWE-59] (link following) and stems from improper handling of archive extraction paths.

Critical Impact

Unauthenticated attackers can achieve remote code execution by supplying a malicious model archive that overwrites server backend files during automatic extraction.

Affected Products

  • mudler LocalAI 2.17.1
  • LocalAI deployments using the model gallery feature with archive-based model configurations
  • Self-hosted LocalAI servers exposed to untrusted model sources

Discovery Timeline

  • 2024-10-29 - CVE-2024-6868 published to the National Vulnerability Database (NVD)
  • 2025-10-15 - Last updated in NVD database

Technical Details for CVE-2024-6868

Vulnerability Analysis

LocalAI supports loading models defined in gallery configurations. When a configuration references additional files packaged as archives, LocalAI downloads the archive and automatically extracts its contents. The extraction routine does not properly validate entry paths against the intended target directory. An attacker who controls or supplies a model configuration can include archive entries with relative path components such as ../../ to escape the models directory.

Writing to arbitrary filesystem locations on the server permits overwriting backend binaries, Python scripts, gRPC backend assets, or configuration files. The next backend invocation executes attacker-controlled content, yielding remote code execution under the privileges of the LocalAI process.

Root Cause

The root cause is missing path sanitization during automatic archive extraction within the gallery package. The extractor concatenates archive entry names with the target directory without verifying that the resolved path remains inside that directory. This pattern aligns with [CWE-59] (improper link resolution before file access) and the broader class of tarslip and zip-slip vulnerabilities.

Attack Vector

The vulnerability is reachable over the network without authentication when the LocalAI installation processes model definitions from attacker-influenced sources. An attacker either hosts a malicious gallery, submits a crafted model configuration, or compromises an upstream URL referenced by the deployment. No user interaction is required once the configuration is processed.

go
// Patch references from commit a181dd0ebc5d3092fc50f61674d552604fe8ef9c
// core/backend/llm.go - gallery package relocation as part of the fix
 	"github.com/mudler/LocalAI/core/config"
 	"github.com/mudler/LocalAI/core/schema"
 
-	"github.com/mudler/LocalAI/pkg/gallery"
+	"github.com/mudler/LocalAI/core/gallery"
 	"github.com/mudler/LocalAI/pkg/grpc"
 	"github.com/mudler/LocalAI/pkg/grpc/proto"
 	model "github.com/mudler/LocalAI/pkg/model"

Source: GitHub Commit a181dd0

Detection Methods for CVE-2024-6868

Indicators of Compromise

  • Files written outside the configured models directory immediately after a model download or gallery install operation
  • Modifications to LocalAI backend binaries, Python scripts, or gRPC assets with timestamps matching archive extraction events
  • Unexpected .tar, .tar.gz, or .zip downloads originating from untrusted gallery URLs
  • New or modified executable files in directories such as /usr/local/bin, the LocalAI install path, or user home directories owned by the LocalAI service account

Detection Strategies

  • Monitor file creation and modification events outside the expected models directory by the LocalAI process
  • Inspect archive entries before extraction for path components containing .., absolute paths, or symbolic link targets
  • Audit gallery configuration sources and validate that referenced archive URLs originate from trusted hosts
  • Alert on LocalAI child processes that execute unexpected binaries or scripts shortly after a model load

Monitoring Recommendations

  • Enable filesystem auditing (auditd, Sysmon FileCreate) for the LocalAI installation directory and parent paths
  • Log all outbound HTTP requests from the LocalAI service and correlate with archive extraction activity
  • Track process execution lineage from the LocalAI parent process to identify backend tampering

How to Mitigate CVE-2024-6868

Immediate Actions Required

  • Upgrade LocalAI beyond version 2.17.1 to a release that includes the gallery refactor from commit a181dd0e
  • Restrict gallery configuration sources to internally vetted URLs and disable processing of arbitrary user-supplied model definitions
  • Run the LocalAI service under a dedicated low-privilege account with write access limited to the models directory
  • Apply filesystem-level controls such as read-only mounts for backend asset directories

Patch Information

The maintainers addressed the issue in the gallery refactor merged as commit a181dd0ebc5d3092fc50f61674d552604fe8ef9c. The fix relocates the gallery package from pkg/gallery to core/gallery and revises archive handling logic. Review the GitHub Commit for LocalAI and the Huntr Vulnerability Bounty report for remediation details.

Workarounds

  • Disable automatic archive extraction features until the patched version is deployed
  • Place the LocalAI process inside a container or sandbox that prevents writes outside the models volume
  • Pre-validate model archives offline with a tool that rejects entries containing path traversal sequences
  • Apply mandatory access controls (SELinux, AppArmor) to block LocalAI from writing to backend asset paths
bash
# Example: run LocalAI in a container with read-only backend assets
docker run --rm \
  --read-only \
  --tmpfs /tmp \
  -v /srv/localai/models:/models:rw \
  -v /srv/localai/backends:/backends:ro \
  -u 1000:1000 \
  localai/localai:latest

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechMudler Localai

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.49%

  • 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-59

  • NVD-CWE-noinfo
  • Technical References
  • Huntr Vulnerability Bounty
  • Vendor Resources
  • GitHub Commit for LocalAI
  • Related CVEs
  • CVE-2024-2029: Mudler LocalAI RCE Vulnerability

  • CVE-2024-5182: Mudler LocalAI Path Traversal 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