CVE-2026-40959

Lua sandbox escape via crafted module in Luanti using LuaJIT

Published Apr 16, 2026 CVSS 3.1 · 9.3 Critical EPSS < 1% KEV · Not listed
Description
Luanti 5 before 5.15.2, when LuaJIT is used, allows a Lua sandbox escape via a crafted mod.

Analysis

AI-generated

Technical impact

A crafted mod that exploits LuaJIT in Luanti allows a sandbox escape, giving an attacker the ability to execute arbitrary Lua code outside the intended safe environment. This flaw maps to CWE-829, exposing the application to excessive privilege gain during mod loading.

Affected Systems

Luanti is impacted in all versions prior to 5.15.2. Users running Luanti 5.x with LuaJIT enabled are at risk.

Risk and Exploitability

The vulnerability has a CVSS score of 9.3, indicating critical severity, and is not listed in the CISA Known Exploited Vulnerabilities catalog. EPSS data is unavailable, but the lack of mitigation in the community suggests the risk remains high. The likely attack vector is the deployment of a crafted mod in environments where LuaJIT is enabled; this inference is based on the description of a sandbox escape via a crafted module.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Luanti to version 5.15.2 or newer, which resolves the sandbox escape.
  • Disable LuaJIT functionality in Luanti unless required for legitimate workarounds.
  • Restrict mod installation to verified, trusted sources and audit mod code before deployment.

Generated by OpenCVE AI on April 16, 2026 at 09:03 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DSA Debian DSA DSA-6217-1 luanti security update
Ubuntu USN Ubuntu USN USN-8366-1 Luanti vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Title Lua sandbox escape via crafted module in Luanti using LuaJIT
First Time appeared Luanti
Luanti luanti
Vendors & Products Luanti
Luanti luanti
Type Values Removed Values Added
Description Luanti 5 before 5.15.2, when LuaJIT is used, allows a Lua sandbox escape via a crafted mod.
Weaknesses CWE-829
References
Metrics cvssV3_1

{'score': 9.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H'}

Weaknesses
  • CWE-829

    Inclusion of Functionality from Untrusted Control Sphere

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Apr 16, 2026, 12:32 PM
Reserved
Apr 16, 2026, 12:51 AM
Status
Deferred
Published
Apr 16, 2026, 1:16 AM
Modified
Jun 17, 2026, 10:45 AM