# CVE-2026-41196: Luanti has a mod security sandbox escape

> A malicious mod can escape the Lua sandbox to execute arbitrary code and access the filesystem when LuaJIT is enabled.

- **Severity:** Critical 9.0 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Apr 2026
- **Updated:** 23 Apr 2026
- **Also known as:** DEBIAN-CVE-2026-41196, UBUNTU-CVE-2026-41196, USN-8732-1

## What is CVE-2026-41196?

CVE-2026-41196 is a critical code injection vulnerability in luanti-org luanti, published on 23 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Luanti (formerly Minetest) is an open source voxel game-creation platform. Starting in version 5.0.0 and prior to version 5.15.2, a malicious mod can trivially escape the sandboxed Lua environment to execute arbitrary code and gain full filesystem access on the user's device. This applies to the server-side mod, async and mapgen as well as the client-side (CSM) environments. This vulnerability is only exploitable when using LuaJIT. Version 5.15.2 contains a patch. On release versions, one can also patch this issue without recompiling by editing `builtin/init.lua` and adding the line `getfenv = nil` at the end. Note that this will break mods relying on this function (which is not inherently unsafe).

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2026-41196?

It affects 1 product.


Products: Minetest Minetest.

## How do I fix CVE-2026-41196?

Apply the vendor's patch.

## Is CVE-2026-41196 being exploited?

There is no known exploitation of CVE-2026-41196 in the wild and no public exploit code.

## Other vulnerabilities in luanti-org luanti

- [CVE-2022-35978](https://insights.sbomify.com/CVE-2022-35978/): Lua sandbox escape from mod in Minetest (high 7.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-41196 and fix it if it is affected.

What it is: CVE-2026-41196 is a critical code injection vulnerability in luanti-org luanti, published on 23 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-41196 in the wild and no public exploit code.

Affected product: luanti-org luanti. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-41196/ (Markdown: https://insights.sbomify.com/CVE-2026-41196/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-41196
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-41196
- OSV: https://osv.dev/vulnerability/CVE-2026-41196

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-41196/
Summaries are generated and may contain mistakes; the official description above is the record.
