Skip to main content
Menu
CVEs

BeamNG.drive sandbox escape via out-of-bounds write in LuaJIT

CVE-2026-133528Published , updated

9.3CriticalCNA
Exploited
No known exploitation
Fix
Fixed in 0.40.6
Who is exposed
Specific setups only

Summary

BeamNG GmbH's BeamNG.drive contains a flaw in its embedded LuaJIT scripting sandbox, where JIT-compiled code skips array bounds checks. A local attacker who gets a malicious mod loaded (the user has to take an action to open or run it) can write out of range, escape the sandbox, and run commands as the game user.

Written by a model

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.

Who should check

Teams and players running BeamNG.drive before 0.40.6, including anyone who loads third-party mods

“BeamNG.drive before 0.40.6 contains an out-of-bounds write vulnerability”

vulncheck.com

What to do

  1. Check whether your setup matches what the bug needs.

    BeamNG.drive versions before 0.40.6 Attacker must supply a malicious mod that runs untrusted Lua
  2. Upgrade to a fixed version: 0.40.6.

Check your systems with an agent

Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.

Check whether my systems are affected by CVE-2026-133528 (BeamNG.drive before 0.40.6 LuaJIT FFI Sandbox Escape via JIT Bounds-Check Bypass), using the cve.now data below.

Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.

What cve.now has for CVE-2026-133528 (entry last updated 2026-11-20):
Affected:
- BeamNG GmbH BeamNG.drive: fixed in 0.40.6
Fixed versions: 0.40.6.
Conditions (all must be true for the bug to be hit):
- BeamNG.drive versions before 0.40.6 (source: https://www.vulncheck.com/advisories/beamng-drive-before-0.40.6-luajit-ffi-sandbox-escape-via-jit-bounds-check-bypass)
- Attacker must supply a malicious mod that runs untrusted Lua (source: https://www.vulncheck.com/advisories/beamng-drive-before-0.40.6-luajit-ffi-sandbox-escape-via-jit-bounds-check-bypass)
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
Attacker needs: local access, no login, a user action.
CISA KEV: CVE-2026-133528 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-133528 only. If you also check another CVE, look up its own KEV status; never assume it from this one.

How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.

Verify against the linked advisories before concluding, and cite the date you read each one:
- https://store.steampowered.com/news/app/284160/view/681890829846973542
- https://www.vulncheck.com/advisories/beamng-drive-before-0.40.6-luajit-ffi-sandbox-escape-via-jit-bounds-check-bypass
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.

Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.

Entry: https://cve.now/CVE-2026-133528
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-133528"}.

Affected versions

cve.now Index

14Pof 100 · provisional · methodology v3
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure5/25Specific setups only
  • Reach?/20Unknown. No tracked technology or package matched
  • Severity9.3/10CVSS 9.3
  • No patch0/5No signal

What would change the score

  • Would score about 64 if added to CISA KEV
  • Would score about 59 if CISA's SSVC rates exploitation active
  • Would score about 24 if CISA's SSVC rates it automatable

Timeline

  1. CVE published
  2. First seen by cve.now
  3. Posted on X by cve.now

Evidence 5

KindSource
CVE record 2Establishes: The identifier and description.
RecordCVE List · CVE-2026-133528
RecordNVD · CVE-2026-133528
Public exploit code 1Establishes: Public exploit code exists (Exploit-DB, Metasploit, Nuclei and GitHub).
ExploitGitHub · drbloop2000/BeamNG-Drive-RCE · Repository
Other links 2
Advisorystore.steampowered.com · news/app/284160/view/681890829846973542
Linkvulncheck.com · advisories/beamng-drive-before-0.40.6-luajit-ffi-sandbox-escape-via-jit-bounds-check-bypass

Questions about CVE-2026-133528

Is CVE-2026-133528 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: cve.now feed data

What does this mean?

A malicious mod can run untrusted Lua that uses LuaJIT's FFI to write outside a checked memory range during JIT compilation. This lets the Lua code escape the game's sandbox, re-enable ffi.load, and run commands as the game user.

Source: vulncheck.com

Which versions are affected by CVE-2026-133528?

BeamNG.drive: before 0.40.6.

Source: cve.now feed data

Am I affected, and how do I check?

BeamNG.drive versions before 0.40.6 are affected, and the attack requires a malicious mod that runs untrusted Lua. To check a installed copy, look up the game version shown in the game's version information and compare it with 0.40.6.

Source: vulncheck.com

How do I fix CVE-2026-133528?

Update BeamNG.drive to version 0.40.6 or later, which is the listed fixed version.

Source: vulncheck.com

No corrections so far. Something wrong on this page? Report an error.