Vulnerability record · CVE-2017-0038 · published 20 February 2017
CVE-2017-0038: Windows GDI gdi32.dll heap memory disclosure via crafted EMF file
Microsoft · Windows 10
gdi32.dll in the Windows Graphics Device Interface fails to properly handle crafted EMF files, specifically an EMR_SETDIBITSTODEVICE record with modified DIB dimensions, allowing disclosure of process heap memory. The flaw is an incomplete fix for CVE-2016-3216, CVE-2016-3219, and CVE-2016-3220, so systems patched for those earlier issues may still be exposed.
Description
gdi32.dll in Graphics Device Interface (GDI) in Microsoft Windows Vista SP2, Windows Server 2008 SP2 and R2 SP1, Windows 7 SP1, Windows 8.1, Windows Server 2012 Gold and R2, Windows RT 8.1, and Windows 10 Gold, 1511, and 1607 allows remote attackers to obtain sensitive information from process heap memory via a crafted EMF file, as demonstrated by an EMR_SETDIBITSTODEVICE record with modified Device Independent Bitmap (DIB) dimensions. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-3216, CVE-2016-3219, and/or CVE-2016-3220.
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Automated analysis
high priorityAlthough CVSS is medium (5.5), the very high EPSS score and public exploit code make this a high-priority patching target, especially given the incomplete-fix history.
What it is
gdi32.dll in the Windows Graphics Device Interface fails to properly handle crafted EMF files, specifically an EMR_SETDIBITSTODEVICE record with modified DIB dimensions, allowing disclosure of process heap memory. The flaw is an incomplete fix for CVE-2016-3216, CVE-2016-3219, and CVE-2016-3220, so systems patched for those earlier issues may still be exposed.
Impact
An attacker can read sensitive information from process heap memory, which may include pointers, data from other processes, or other confidential content that aids further exploitation. The CVSS vector shows high confidentiality impact with no integrity or availability impact.
Attack surface
The vulnerability is reached locally (AV:L) with no privileges required (PR:N) but requires user interaction (UI:R), typically opening or rendering a malicious EMF file. The description states remote attackers can obtain information, but the CVSS vector and the crafted-file nature indicate the practical path is a user opening a malicious document or image.
Exploitation
CISA KEV does not list this CVE, but EPSS is very high (0.821, 99.6th percentile) and public exploit code exists on Exploit-DB and GitHub, indicating active interest and availability of proof-of-concept or weaponized code.
What to do
- Apply the Microsoft security update for CVE-2017-0038 as soon as possible, since the flaw is an incomplete fix for earlier GDI CVEs.
- If patching is delayed, consider the 0patch micropatch referenced in the advisory as a temporary mitigation.
- Restrict or block untrusted EMF files at email gateways, web proxies, and endpoint content filters.
- Educate users not to open EMF files or documents containing embedded EMF images from untrusted sources.
- Where feasible, disable or restrict GDI-based rendering of untrusted content in applications that process EMF files.
Detection
- Monitor for processes loading gdi32.dll and subsequently reading or rendering EMF files from untrusted locations such as email attachments or downloads.
- Search endpoint telemetry for EMF file creation or opening events correlated with unusual process memory read behavior.
- Use file analysis or sandboxing to inspect EMF files for EMR_SETDIBITSTODEVICE records with anomalous DIB dimensions.
- Review Windows event logs and EDR alerts for known exploit patterns or public PoC signatures associated with CVE-2017-0038.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
8 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
Track CVE-2017-0038 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2017-0038), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.