CVE-2026-40959
Raw vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:HCVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). Risk Priority is our own derived reading, not an NVD score.
Summary
CVE-2026-40959 is a critical-severity Inclusion of Functionality from Untrusted Control Sphere (CWE-829) vulnerability. Its CVSS base score is 9.3 (Critical).
Operationally, exploitation aligns with the MITRE ATT&CK technique Software Extensions (T1176); ranked at the 8th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified map to SR-4 (Provenance) and SR-11 (Component Authenticity) — see the control section below for these in your framework.
Deeper analysis AI-assisted summary
Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.
CVE-2026-40959 is a high-severity vulnerability (CVSS 3.1 score of 9.3) affecting Luanti 5 versions prior to 5.15.2 when compiled with LuaJIT. It enables a Lua sandbox escape through a crafted mod, stemming from CWE-829 (Inclusion of Functionality from Untrusted Control Sphere). The issue was published on 2026-04-16 and arises in environments where untrusted Lua code is executed within a sandboxed context provided by Luanti, a Lua-based game engine.
An unprivileged local attacker (AV:L, PR:N) can exploit this vulnerability with low complexity (AC:L) and no user interaction (UI:N). Successful exploitation allows scope change (S:C), granting high-impact access to confidentiality (C:H), integrity (I:H), and availability (A:H) on the host system by breaking out of the Lua sandbox via the malicious mod.
Mitigation is available through patches in Luanti commits 53cef183e2a85a4daff84ac1a9a7946f940da8f8 and 8a929dfb97aa08337f49ba1bb96a56d6557dc896, which address the sandbox escape. Additional details are provided in the Luanti security advisory at GHSA-g596-mf82-w8c3. Security practitioners should upgrade to Luanti 5.15.2 or later and avoid LuaJIT if sandboxing untrusted mods is required.
OWASP Top 10 for Web (2025)
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2026-23149
Vulnerability Data
Luanti 5 before 5.15.2, when LuaJIT is used, allows a Lua sandbox escape via a crafted mod.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
CVEs Like This One
Affected Assets
Mitigating Controls
Control response
—
—
- 6 hardening rules · 6 OS baselines
V14.2.3V3.5.6V9.1.3V15.3.2
Mitigating Controls (NIST 800-53 r5) AI
Requires documented, valid provenance for components, preventing acceptance of code from outside the trusted sphere.
Implements detection and prevention of counterfeit or inauthentic components before they are integrated.
Establishes processes to identify and address supply-chain weaknesses that would allow untrusted functionality.
Mitigating Controls (NIST CSF 2.0) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.
Supply-chain program directly governs inclusion of third-party executable code.
Contractual requirements can mandate trusted sources and integrity checks for included functionality.
Supplier risk assessment explicitly covers risks from their products and libraries.
Software inventory enables tracking of externally sourced components but does not itself enforce trust.
Pre-acquisition integrity/authenticity checks directly prevent inclusion of untrusted code.
Critical-supplier assessment reduces risk of importing executable functionality from untrusted parties.
Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.
By requiring suppliers to propagate security requirements and to disclose component provenance, the control limits the inclusion of functionality obtained from untrusted third-party sources without oversight.
Hardening callouts derived
Configuration rules from DISA STIG baselines that bear on weaknesses of the type cited by this CVE. Each rule is shown with the relationship its mapping actually records, against the CWE it was authored against. Derived via CVE→CWE over `controls_xwalks` (higher-evidence rows only; rows rated `none` are excluded).
Oracle Linux 8 (1 rule)
- V-248635 Executable search paths within the initialization files of all local interactive OL 8 users must only contain paths that resolve to the system default or the user's home directory. prevents CWE-829
Oracle Linux 9 (1 rule)
- V-271847 OL 9 must be configured so that executable search paths within the initialization files of all local interactive users must only contain paths that resolve to the system default or the users home directory. prevents CWE-829
RHEL 7 (1 rule)
- V-204477 The Red Hat Enterprise Linux operating system must be configured so that all local interactive user initialization files executable search paths contain only paths that resolve to the users home directory. prevents CWE-829
RHEL 8 (1 rule)
- V-230317 Executable search paths within the initialization files of all local interactive RHEL 8 users must only contain paths that resolve to the system default or the users home directory. prevents CWE-829
RHEL 9 (1 rule)
- V-258050 Executable search paths within the initialization files of all local interactive RHEL 9 users must only contain paths that resolve to the system default or the users home directory. prevents CWE-829
Windows 10 (1 rule)
- V-220737 Administrative accounts must not be used with applications that access the Internet, such as web browsers, or with potential Internet sources, such as email. prevents CWE-829