VirtualBox Process Hardening Bypass (CVE‑2026‑87268) Enables Arbitrary Code Execution in Protected VM Processes
What Happened — Project Zero researcher discovered a new vulnerability (CVE‑2026‑87268) in Oracle VirtualBox 2026 Edition on Windows. By exploiting a .NET Framework assembly‑loading quirk together with VirtualBox’s DLL‑loader hooks, an attacker can force the runtime to use a “FlatImageLayout” path, bypassing the image‑integrity checks that protect the VirtualBox process. The result is arbitrary native code execution inside the hardened VM‑process, effectively breaking VirtualBox’s protected‑process hardening. Oracle has released a fix that stops the status‑code manipulation used in the exploit.
In 2017 a security researcher examined Oracle VirtualBox on Windows, concentrating on the mechanism that shields virtual‑machine processes from the host user. At that time the study uncovered three ways to bypass the driver‑gate protection and, after reporting a COM‑runtime flaw in 2020, the findings were compiled into a public blog post. Revisiting the product in 2026, the analyst identified three additional bypass techniques and a new regression: a fix that had been applied to the 2020 issue was broken by later Windows changes. The write‑up highlights CVE‑2026‑87268, which leverages a .NET Framework feature together with VirtualBox’s DLL‑loader hooks to inject arbitrary code into a protected process.
The exploitation path hinges on the .NET Framework’s ability to load assemblies directly from a memory buffer using only managed code. The Assembly.Load method accepts a byte array, allowing code to be introduced without touching the traditional image‑mapping pipeline that most hardening checks monitor. The researcher previously demonstrated this approach in 2017 by invoking the API through the JScript engine and releasing a utility called DotNetToJScript.
A deeper look at the CLR v4 implementation reveals that the core routine PEImageLayout::Map first attempts to create a MappedImageLayout object. This constructor calls CreateFileMapping with the SEC_IMAGE flag, which tells the kernel to treat the file as a PE executable and to build an image section that can be inspected by integrity mechanisms. If that call fails with the error ERROR_BAD_EXE_FORMAT, the code falls back to constructing a FlatImageLayout, which invokes CreateFileMapping without SEC_IMAGE, producing a data‑only section that bypasses image‑based verification. A subsequent PEDecoder::CheckFormat call still validates the PE format, but the lack of an image section means signature‑or‑location checks never see the load.
The technique only works on .NET Framework version 4; earlier releases such as 3.5 and 2.0 eventually pass the assembly to LoadLibrary, causing a failure, and the newer .NET runtimes (v5 and above) are not examined because they are not default components of recent Windows 11 installations. The researcher notes that the Windows Lockdown Policy (WLDP) and User‑Mode Code Integrity (UMCI) checks can abort the load if they are active, a factor that becomes relevant later in the VirtualBox exploitation chain.
The hardening routine in VirtualBox hooks the NtCreateSection system call, which underlies CreateFileMapping. When the call requests an executable section—identified by the SEC_IMAGE or related flags—the hook forwards the file handle to supR3HardenedScreenImage. That API validates the PE against VirtualBox’s loading rules and only invokes the real NtCreateSection if the check passes or the mapping is non‑executable. Calls that use CreateFileMapping without an image or executable flag bypass the hook entirely.
Returning an error is possible because supR3HardenedScreenImageCalcStatus maps the internal error VERR_LDR_ARCH_MISMATCH to STATUS_INVALID_IMAGE_FORMAT. The parser sets VERR_LDR_ARCH_MISMATCH when a PE’s architecture does not match the host yet the file contains executable sections. A .NET assembly compiled as AnyCPU produces a 32‑bit x86 PE on a 64‑bit Windows host, triggering the mismatch while still exposing code in the optional header. The dumpbin output shown confirms a 32‑bit DLL with a non‑zero size of code field.
Exploiting the gap therefore requires only an unmodified AnyCPU .NET DLL. Because the file is a legitimate assembly, the FlatImageLayout class can load it after the hardening check returns STATUS_INVALID_IMAGE_FORMAT, granting code execution. The attacker can force the DLL to be loaded by registering a COM class in the current user’s hive that the hardened VirtualBox process will instantiate; the COM activation pulls in the .NET runtime, which then loads the malicious assembly. A full proof‑of‑concept is linked in the project’s issue tracker.
Mitigations and scope: the WLDP (Windows Code Integrity) check would only intervene if a system enforces a code‑integrity policy with Dynamic Code Security or UMCI enabled, a scenario the author deems unlikely for most users. VirtualBox addressed the flaw by removing the STATUS_INVALID_IMAGE_FORMAT return path from supR3HardenedScreenImageCalcStatus and by adding an undocumented COM option that disables lookups in the current‑user hive, making COM hijacking harder. The write‑up notes that the same .NET‑driven technique could affect Windows Defender Application Control and protected processes, provided an attacker can similarly cause NtCreateSection to emit STATUS_INVALID_IMAGE_FORMAT.
The attack hinges on a single‑bit modification in the COFF header: clearing the IMAGE_FILE_EXECUTABLE_IMAGE characteristic forces NtCreateSection to return STATUS_INVALID_IMAGE_FORMAT, yet the .NET runtime ignores that flag when loading the file with Assembly::Load. By first invoking NtCreateSection and, on failure, falling back to Assembly::Load, a simple fuzzer or manual editing can produce a PE that the kernel rejects as an image but .NET still treats as a valid assembly.
In environments where a WDAC code‑integrity policy is deployed, the Dynamic Code Security option (disabled by default) would block the bypass because it disables all dynamic .NET loading, including the byte‑array overload of Assembly::Load. The researcher therefore targeted Windows 11 S Mode, which enables UMCI but leaves Dynamic Code Security off. Using the built‑in Assembly Registration Tool ( regasm.exe from C:\Windows\Microsoft.NET\Framework64\v4.0.30319 ), the modified DLL was passed with the /unregister switch, e.g. C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm.exe c:\path\to\assembly.dll /unregister. Despite expectations, the altered assembly executed arbitrary code even with UMCI active.
The underlying WLDP check was found to be flawed: it only verifies that the policy flags are not exactly equal to the combination WLDP_LOCKDOWN_DEFINED_FLAG | WLDP_LOCKDOWN_CONFIG_CI_FLAG | WLDP_LOCKDOWN_UMCIENFORCE_FLAG. On Windows 11 S Mode, WldpGetLockdownPolicy returns precisely that flag set, causing the check to pass and allowing the load to bypass UMCI enforcement. For regular protected processes the WLDP gate is irrelevant, and .NET does not verify protected status, limiting exploitation to Protected Process Light (PPL) binaries. By hijacking the COM registration used by WerSecureFault.exe, the attacker can inject the modified .NET DLL into a PPL, achieving code execution at the TCB level without administrative rights.
The researcher initially refrained from reporting, citing MSRC’s Security Servicing Criteria that exclude PPL bypasses, and presented the findings at the 2026 44Con conference. After .NET developers highlighted that the Dynamic Code Policy unintentionally blocked the exploit, they urged a formal MSRC submission. By late September 2026 the vulnerability had already been disclosed publicly, prompting Microsoft to assign CVE‑2026‑108398 and release a patch in October 2026. The fix rewrites the WLDP validation to use WLDP_LOCKDOWN_IS_ENFORCE, explicitly checking for UMCI‑enabled lockdown and rejecting the load with ERROR_BAD_EXE_FORMAT; however, the patch does not affect PPL scenarios, which remain exploitable. The .NET team was thanked for the rapid response.
Why It Matters for Trust & Control Assurance — The flaw highlights a gap in application‑level hardening and code‑integrity controls; mapping this to a control‑objective shows the need for continuous evidence that hardening mechanisms remain effective after updates.
Who Is Affected — Vendors of desktop‑virtualization, endpoint security solutions, and any organization that runs VirtualBox VMs on Windows workstations (technology, SaaS, and development environments).
Recommended Actions
- Verify that the latest VirtualBox 2026 Edition patches are applied.
- Review your code‑integrity policies (WDAC/UMCI) to ensure they block dynamic .NET assembly loading from untrusted sources.
- Incorporate automated control‑mapping scans that validate hardening hooks remain intact after each software update.
Source: Google Project Zero – VirtualBox Process Hardening
Technical Notes
- Attack vector: exploitation of .NET Framework v4 assembly loading combined with VirtualBox’s NtCreateSection hook.
- CVE: CVE‑2026‑87268 (privilege‑escalation / code‑execution).
- Affected component: VirtualBox DLL‑loader hardening module on Windows 11/10.
- Mitigation: Oracle changed the status‑code handling in
supR3HardenedScreenImageCalcStatusand added COM‑hijack resistance.
Source: same as above