CVE-2026-40959 Code injection in Luanti

Critical 9.3 Published Updated

Attackers can execute arbitrary code by exploiting a Lua sandbox escape in Luanti when LuaJIT is enabled via a crafted mod.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2026-40959?

CVE-2026-40959 is a critical code injection vulnerability in Luanti, published on 16 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

Luanti 5 before 5.15.2, when LuaJIT is used, allows a Lua sandbox escape via a crafted mod.

Weakness: CWE-829

Which versions are affected by CVE-2026-40959?

How do I fix CVE-2026-40959?

Upgrade to a fixed version.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-40959 being exploited?

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

Sources

Also known as DEBIAN-CVE-2026-40959, GHSA-wxm2-x9x9-x5mj, UBUNTU-CVE-2026-40959.

Is CVE-2026-40959 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free