CVE-2026-41196
LuaJIT Sandbox Escape in Luanti Allows Arbitrary Code Execution
Publication date: 2026-04-23
Last updated on: 2026-04-23
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| luanti | minetest | to 5.15.2 (exc) |
| luanti | minetest | 5.15.2 |
| luanti | minetest | From 5.0.0 (inc) to 5.15.2 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-94 | The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. |
Attack-Flow Graph
AI Powered Q&A
How can this vulnerability impact me? :
This vulnerability can have severe impacts because it allows a malicious mod to break out of the intended sandbox and execute arbitrary code on the user's device.
- Full filesystem access can lead to unauthorized reading, modification, or deletion of files.
- Potential installation of malware or other malicious software.
- Compromise of user data and system integrity.
- Loss of control over the affected device.
Can you explain this vulnerability to me?
This vulnerability affects Luanti (formerly Minetest), an open source voxel game-creation platform. In versions starting from 5.0.0 up to but not including 5.15.2, a malicious mod can easily escape the sandboxed Lua environment. This escape allows the mod to execute arbitrary code and gain full access to the user's filesystem.
The vulnerability applies to server-side mods, async and mapgen environments, as well as client-side (CSM) environments, but only when LuaJIT is used. A patch was introduced in version 5.15.2, and it can also be mitigated on release versions by editing the file `builtin/init.lua` to disable the `getfenv` function, although this may break some mods.
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, you should upgrade Luanti (Minetest) to version 5.15.2 or later, which contains a patch for this issue.
If upgrading is not immediately possible, you can patch the issue without recompiling by editing the file `builtin/init.lua` and adding the line `getfenv = nil` at the end.
Be aware that this workaround may break mods that rely on the getfenv function.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
This vulnerability allows a malicious mod to escape the sandboxed Lua environment and execute arbitrary code with full filesystem access on the user's device. Such unauthorized access and potential data compromise could lead to violations of data protection regulations like GDPR and HIPAA, which require strict controls over personal and sensitive data.
If exploited, the vulnerability could result in unauthorized disclosure, alteration, or destruction of protected data, thereby impacting compliance with these standards.