Skip to main content
Mallory
HighExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2016-0040: Privilege Escalation via GDI Bitmap Kernel Memory Manipulation in Windows

Published Feb 10, 2016 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS7.8High · v3.1
EPSS24.3%98th percentile
CISA KEVYesAdded Mar 28, 2022
In the wildActivePer CISA KEV
Vendor
Microsoft Corporation
IdentifiersCVE-2016-0040CWE-269

CVE-2016-0040 is a local privilege escalation vulnerability in the Windows kernel (Vista SP2, Server 2008 SP2/R2 SP1, Windows 7 SP1) that allows a local attacker to gain SYSTEM privileges by exploiting the GDI bitmap object management in kernel memory. The vulnerability is exploited by manipulating the internal pointer (pvScan0) of a bitmap object through a crafted application, enabling arbitrary kernel memory read/write primitives. The exploit leverages predictable heap allocation of bitmaps and abuses GDI Manager/Worker bitmap relationships to overwrite sensitive kernel structures, such as process tokens.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows a local attacker to escalate privileges to SYSTEM, enabling full control over the affected system. The attacker can steal system process tokens, execute arbitrary code with kernel privileges, and potentially disable security mechanisms. The exploit can also cause system instability, including triggering a Blue Screen of Death (BSoD).

Mitigation

If you can’t patch tonight, do this now.

If patching is not immediately possible, restrict local access to trusted users only, as exploitation requires local code execution. Monitor for suspicious bitmap allocations and kernel memory manipulation attempts. Employ endpoint protection solutions capable of detecting privilege escalation exploits targeting GDI objects.

Remediation

Patch, then assume compromise.

Apply the security updates provided by Microsoft for CVE-2016-0040. Ensure all affected Windows systems are patched to the latest supported versions. Microsoft has released patches that address the underlying GDI bitmap management vulnerability in the kernel.

Public exploits

Exploits

2 exploits validated by Mallory's analysis.

View more in app →
ms16_014_wmi_recv_notif.rbThis repository contains a single Metasploit module: 'modules/exploits/windows/local/ms16_014_wmi_recv_notif.rb'. The module exploits CVE-2016-0040, a privilege escalation vulnerability in the WMI subsystem of Windows 7 SP0/SP1 x64. The exploit is local and requires an existing Meterpreter session on a vulnerable system. The module checks the OS version and architecture, ensures the session is not already SYSTEM, and then reflectively injects a DLL ('CVE-2016-0040.x64.dll') containing the exploit and payload. Upon successful exploitation, arbitrary code (typically a Meterpreter shell) is executed with SYSTEM privileges. The module is operational and part of the Metasploit framework, targeting Microsoft Windows 7 x64 systems. The only fingerprintable endpoint is the DLL file used for exploitation.Disclosed Dec 4, 2015 · Framework: metasploit · ruby · localWeaponizedCVE-2016-0040This repository provides a weaponized local privilege escalation exploit for CVE-2016-0040, targeting the WMI subsystem vulnerability in Windows 7 SP0/SP1 x64. The structure includes C source code for the exploit logic (Application, Library, Metasploit directories), a Metasploit module (module.rb) for integration with the Metasploit Framework, and supporting scripts for installation and testing. The main exploit logic is implemented in C, leveraging GDI bitmap primitives to achieve kernel read/write and ultimately steal the SYSTEM process token. The Metasploit module automates exploitation by injecting a reflective DLL into a process (e.g., notepad.exe) and executing a user-supplied payload as SYSTEM. The exploit requires local access and is not a remote exploit. Key fingerprintable endpoints include the device object '\\.\WMIDataDevice' and the Windows kernel binary path. The repository is mature, providing both standalone and Metasploit-integrated exploitation paths, and is suitable for post-exploitation privilege escalation on vulnerable Windows 7 x64 systems.de7ec7ed · Disclosed Aug 3, 2017 · Framework: metasploit · c · cpp · localWeaponized
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Microsoft CorporationWindows 7operating_system
Microsoft CorporationWindows Server 2008operating_system
Microsoft CorporationWindows Vistaoperating_system
FAQ

Frequently asked questions

Is CVE-2016-0040 exploited in the wild?
Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Mar 28, 2022.
Is there a public exploit for CVE-2016-0040?
Yes. Mallory tracks 2 public exploits or proofs of concept for CVE-2016-0040, the earliest disclosed Dec 4, 2015.
Is there a patch for CVE-2016-0040?
Apply the security updates provided by Microsoft for CVE-2016-0040. Ensure all affected Windows systems are patched to the latest supported versions.
What products are affected by CVE-2016-0040?
Microsoft Corporation Windows 7, Microsoft Corporation Windows Server 2008, and Microsoft Corporation Windows Vista.
How severe is CVE-2016-0040?
CVE-2016-0040 has a CVSS v3.1 score of 7.8 (High) and an EPSS score of 24.3% (98th percentile) as of Oct 16, 2026.
Activity feed

Recent activity

1 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malware1Malware families linked to this CVE, with evidence and IOCs.
Detection signatures1YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.