Original description
BeamNG.drive before 0.40.6 contains an out-of-bounds write vulnerability because JIT-compiled LuaJIT traces omit FFI array bounds checks, letting untrusted Lua escape the sandbox. Attackers supplying a malicious mod can JIT-compile an FFI store loop, write out of range using a tostring() address leak, re-enable ffi.load, and run commands as the game user.
Affected products and versions
BeamNG GmbH BeamNG.drive< 0.40.6Fixed in: 0.40.6
CVSS vector, explained
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- None (no login)
- User interaction
- Required
- Scope
- Affects other components
- Confidentiality
- High impact
- Integrity
- High impact
- Availability
- High impact
Weakness type (CWE)
- CWE-787 Out-of-bounds Write
References
- store.steampowered.com/news/app/284160/view/681890829846973542 vendor advisory
- github.com/drbloop2000/BeamNG-Drive-RCE
- www.vulncheck.com/advisories/beamng-drive-before-0.40.6-luajit-ffi-sandbox-escape-via-jit-
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Summaries are AI-written under strict rules; always check the vendor's official advisory.