Read the docs

BeamNG.drive LuaJIT FFI flaw lets malicious mods escape Lua sandbox

Priority HIGH 75CWE-787Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Passive
Attack complexity
Low
Attack requirements
None
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-787 and the CVSS impact.

Summary

BeamNG.drive before 0.40.6 contains an out-of-bounds write (CWE-787) because JIT-compiled LuaJIT traces omit FFI array bounds checks. An attacker who supplies a malicious mod can escape the Lua sandbox, write out of range, and run commands as the game user. Exploitation requires user interaction, and the references link a public exploit.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

Description from the CNA

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00184 4th percentileScored 2026-11-30
Public exploit Yes 1 exploit referenceTagged by the CNA
Fix Fixed BeamNG.drive (BeamNG GmbH): 0.40.6

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
BeamNG GmbHBeamNG.drivebefore 0.40.60.40.6Patch availableCNA
  • BeamNG.drive VendorBeamNG GmbH Affected before 0.40.6 Fixed in 0.40.6 Patch available CNA

Remediation

Update BeamNG.drive to version 0.40.6, which fixes this flaw.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

  • Fix · CNA BeamNG.drive (BeamNG GmbH) Fixed in 0.40.6

Timeline

  1. 2026-11-20 Threatist record created from CVE-2026-133528
  2. 2026-11-20 Alias added: GHSA-7wxf-w2p5-7pvr
  3. 2026-11-25 CISA SSVC decision points changed

References

Sources