# CVE-2026-133528: BeamNG.drive before 0.40.6 LuaJIT FFI Sandbox Escape via JIT Bounds-Check Bypass


- **Severity:** Critical 9.3 (`CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 20 Nov 2026
- **Updated:** 20 Nov 2026
- **Also known as:** GHSA-7wxf-w2p5-7pvr

## What is CVE-2026-133528?

CVE-2026-133528 is a critical vulnerability in BeamNG.drive, published on 20 Nov 2026. 

### Official 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.

Weakness: CWE-787 (Out-of-bounds Write)

## Which versions are affected by CVE-2026-133528?


## How do I fix CVE-2026-133528?

Upgrade BeamNG.drive to 0.40.6 or later. The advisory says that version fixes it.

## Is CVE-2026-133528 being exploited?

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

Public exploit code:

- RCE exploit for BeamNG.drive (CVE-2026-133528) (github_poc): https://github.com/drbloop2000/BeamNG-Drive-RCE

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-133528 and fix it if it is affected.

What it is: CVE-2026-133528 is a critical vulnerability in BeamNG.drive, published on 20 Nov 2026. 
Exploitation: There is no known exploitation of CVE-2026-133528 in the wild and no public exploit code.

Affected product: BeamNG.drive. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-133528/ (Markdown: https://insights.sbomify.com/CVE-2026-133528/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-133528
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-133528
- OSV: https://osv.dev/vulnerability/CVE-2026-133528

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-133528/
Summaries are generated and may contain mistakes; the official description above is the record.
