Oracle VirtualBox Shared Folders Kernel Memory Exhaustion DoS (CVE-2026-21986)
by Mohammed Ba Rashed (GitHub: MohaBars) · 2026-07-05
- Severity
- Medium
- CVE
- CVE-2026-21986
- Category
- binary
- Affected product
- Oracle VM VirtualBox — Shared Folders kernel driver (VBoxMiniRdr, Windows guest)
- Affected versions
- VirtualBox versions prior to Oracle's patch for CVE-2026-21986 (exact version not specified in source)
- Disclosed
- 2026-07-05
- Patch status
- patched
Tags
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-04 |
| Author / Researcher | Mohammed Ba Rashed (GitHub: MohaBars) |
| CVE / Advisory | CVE-2026-21986 |
| Category | binary |
| Severity | Medium |
| CVSS Score | 7.1 (per source README) |
| Status | PoC |
| Tags | virtualbox, denial-of-service, kernel-memory-exhaustion, ioctl, shared-folders, windows-driver, non-paged-pool |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Oracle VM VirtualBox — Shared Folders kernel driver (VBoxMiniRdr, Windows guest) |
| Versions Affected | VirtualBox versions prior to Oracle’s patch for CVE-2026-21986 (exact version not specified in source) |
| Language / Platform | C++ (Windows, DeviceIoControl) |
| Authentication Required | Local-only (requires code execution inside the guest VM) |
| Network Access Required | No |
Summary
CVE-2026-21986 is a denial-of-service vulnerability in the VirtualBox Shared Folders driver interface exposed to Windows guests as the device \\.\VBoxMiniRdrDN. The driver’s IOCTL_MRX_VBOX_ADDCONN handler accepts user-controlled connection-string buffers and allocates kernel non-paged pool memory proportional to each buffer’s size, without adequately bounding or releasing accumulated allocations across repeated calls. The included PoC (poc.cpp) opens the device and repeatedly issues DeviceIoControl calls with large connection-string buffers (tens of megabytes each) across all drive letters and multiple rounds, causing kernel non-paged pool exhaustion. The result is virtual machine freeze/instability rather than code execution or privilege escalation. Oracle has patched the issue and credited the author with discovery.
Vulnerability Details
Root Cause
The IOCTL_MRX_VBOX_ADDCONN handler in the VirtualBox Shared Folders kernel driver allocates non-paged kernel memory sized to attacker-controlled input buffers on every call, and repeated valid calls accumulate allocations faster than they are released, exhausting the non-paged pool.
Attack Vector
- From inside a Windows guest VM with VirtualBox Guest Additions/Shared Folders enabled, open a handle to
\\.\VBoxMiniRdrDN. - Build a connection-string buffer (
\Device\VBoxMiniRdr\;X:\vboxsvr\sf) padded to tens of megabytes. - Call
DeviceIoControlwithIOCTL_MRX_VBOX_ADDCONN, iterating across every drive letter. - Repeat across many rounds so that per-call kernel allocations accumulate faster than the driver frees them.
- Non-paged kernel pool becomes exhausted, freezing or destabilizing the guest VM.
Impact
Local denial of service against the guest VM (freeze/instability) via kernel non-paged memory exhaustion; no memory corruption, code execution, or privilege escalation observed.
Environment / Lab Setup
Target: Windows guest VM running under vulnerable Oracle VirtualBox with Shared Folders enabled
Attacker: Windows guest with a C++ toolchain (MSVC/MinGW) to build and run poc.cpp
Proof of Concept
PoC Script
See
poc.cppin this folder. Additional analysis intechnical_writeup.mdandmemory_analysis.md.
| |
Opens \\.\VBoxMiniRdrDN and repeatedly sends IOCTL_MRX_VBOX_ADDCONN requests with ~32MB connection-string buffers across all drive letters for 100 rounds, driving kernel non-paged pool consumption until the guest VM becomes unstable or freezes.
Detection & Indicators of Compromise
Signs of compromise:
- Sudden guest VM freeze or severe slowdown with no corresponding legitimate shared-folder activity
- A process repeatedly calling
DeviceIoControlagainst\\.\VBoxMiniRdrDNwith abnormally large buffers - Non-paged pool usage climbing steadily under
Process Explorer/poolmonwithout correlated workload
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade to the Oracle VirtualBox release that patches CVE-2026-21986 (see vendor advisory) |
| Interim mitigation | Disable Shared Folders on guest VMs that don’t require it, or restrict which users/processes inside the guest can interact with the VBoxMiniRdr device |
References
Notes
Mirrored from https://github.com/MohaBars/CVE-2026-21986-VirtualBox-DoS on 2026-07-05.
| |