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-40959

CVE-2026-40959: Luanti 5 RCE Vulnerability

CVE-2026-40959 is a remote code execution vulnerability in Luanti 5 that allows attackers to escape the Lua sandbox through crafted mods when LuaJIT is used. This article covers technical details, affected versions, and mitigation.

Published: April 17, 2026

CVE-2026-40959 Overview

CVE-2026-40959 is a critical sandbox escape vulnerability in Luanti (formerly known as Minetest) versions 5 before 5.15.2 when LuaJIT is used as the Lua interpreter. The vulnerability allows attackers to bypass the Lua sandbox restrictions through a specially crafted mod, potentially leading to arbitrary code execution on the host system.

Critical Impact

A malicious mod can escape the Lua sandbox environment, allowing attackers to execute arbitrary code with the privileges of the Luanti process, potentially compromising the entire host system.

Affected Products

  • Luanti 5 versions prior to 5.15.2 (when using LuaJIT)

Discovery Timeline

  • 2026-04-16 - CVE-2026-40959 published to NVD
  • 2026-04-16 - Last updated in NVD database

Technical Details for CVE-2026-40959

Vulnerability Analysis

This vulnerability is classified under CWE-829 (Inclusion of Functionality from Untrusted Control Sphere), which describes scenarios where software includes functionality from a source that is outside of the intended control sphere. In the context of Luanti, the game engine relies on a Lua sandbox to restrict what mods can do, preventing them from accessing dangerous system functions or escaping the game environment.

When LuaJIT is used as the Lua interpreter, certain implementation differences between LuaJIT and standard Lua create opportunities for sandbox escape. LuaJIT's optimizations and JIT compilation mechanisms can be exploited to bypass the security restrictions that the Luanti sandbox is designed to enforce. An attacker who can distribute or convince a user to install a malicious mod can leverage this vulnerability to break out of the sandbox entirely.

The local attack vector indicates that exploitation requires the victim to download and install the malicious mod locally. However, since mods are commonly shared through community platforms and the game encourages mod usage, the practical attack surface is significant. Successful exploitation grants the attacker code execution capabilities with the same privileges as the Luanti process, which could lead to data theft, malware installation, or further system compromise.

Root Cause

The root cause of this vulnerability lies in the interaction between LuaJIT's execution model and Luanti's sandbox implementation. LuaJIT provides performance optimizations that differ from the reference Lua interpreter, and these differences can create edge cases where sandbox restrictions are not properly enforced. The sandbox relies on restricting access to dangerous Lua functions and modules, but LuaJIT's internal mechanisms may expose alternative pathways to achieve similar functionality.

Attack Vector

The attack requires a threat actor to create a malicious Luanti mod that contains specially crafted Lua code designed to exploit the sandbox escape. The attack flow typically involves:

  1. Attacker crafts a malicious mod containing Lua code that exploits LuaJIT-specific behaviors
  2. The mod is distributed through community channels, mod repositories, or direct sharing
  3. Victim downloads and installs the mod in their Luanti installation
  4. When Luanti loads and executes the mod's Lua code with LuaJIT, the crafted payload escapes the sandbox
  5. Arbitrary code execution is achieved on the victim's system with Luanti process privileges

The vulnerability does not require any user interaction beyond installing the mod, as the malicious code executes automatically when the game loads the mod. For detailed technical implementation, refer to the GitHub Security Advisory.

Detection Methods for CVE-2026-40959

Indicators of Compromise

  • Unexpected system calls or process spawning originating from the Luanti process
  • Network connections initiated by Luanti to suspicious external hosts
  • File system modifications outside of expected Luanti directories
  • Presence of unknown or recently modified mods in the Luanti mods directory

Detection Strategies

  • Monitor process behavior for Luanti instances attempting to execute system commands or spawn child processes
  • Implement application allowlisting to detect unauthorized code execution from game directories
  • Review installed mods against known-good checksums from trusted sources
  • Use endpoint detection tools to identify sandbox escape patterns in scripting engines

Monitoring Recommendations

  • Enable detailed logging for Luanti installations, particularly in server environments
  • Monitor for unusual file access patterns from the Luanti process
  • Implement network monitoring to detect unexpected outbound connections from game processes
  • Regularly audit installed mods and their sources in multi-user or server deployments

How to Mitigate CVE-2026-40959

Immediate Actions Required

  • Upgrade Luanti to version 5.15.2 or later immediately
  • Audit all installed mods and remove any from untrusted or unknown sources
  • Consider using standard Lua interpreter instead of LuaJIT if upgrade is not immediately possible
  • Restrict Luanti installations to isolated environments until patched

Patch Information

The Luanti development team has released security patches to address this vulnerability. The fixes are available in the following commits:

  • GitHub Commit 53cef18 - Initial security fix
  • GitHub Commit 8a929df - Additional security hardening

Users should update to Luanti 5.15.2 or later, which includes these patches. For complete details on the vulnerability and remediation, see the GitHub Security Advisory.

Workarounds

  • Switch from LuaJIT to standard Lua interpreter if supported by your Luanti build
  • Only install mods from verified and trusted sources with established reputations
  • Run Luanti in a sandboxed environment such as a container or virtual machine
  • Disable mod loading entirely if mods are not required for your use case
bash
# Configuration example
# Example: Run Luanti in a restricted environment using Firejail
firejail --private --net=none luanti

# Or use a container to isolate the Luanti process
podman run --rm -it --security-opt=no-new-privileges luanti:5.15.2

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechLuanti

  • SeverityCRITICAL

  • CVSS Score9.3

  • EPSS Probability0.00%

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

  • GitHub Commit Update

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-41196: Luanti (Minetest) RCE Vulnerability

  • CVE-2026-40960: Luanti 5 Auth Bypass 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