Opening an image in Microsoft Paint sounds like the most harmless thing you can do. CVE-2026-35421 changes that. Microsoft shipped a fix for this flaw in its May 12, 2026 Patch Tuesday and rated it as remote code execution in the Windows GDI graphics subsystem.
What the vulnerability is
GDI (Graphics Device Interface) is the Windows layer that draws graphics on screen and handles vector image formats such as Enhanced Metafile (EMF). CVE-2026-35421 is a heap-based buffer overflow (CWE-122) in the code that parses these files. When GDI processes a specially crafted EMF, it writes past the bounds of a structure allocated on the heap. That attacker-controlled write is what makes code execution possible.
The practical trigger is Microsoft Paint. Paint relies on GDI to render its content, so a victim only has to open a malicious EMF file for the vulnerable code to run. The file does not need to look suspicious or throw an error; the damage happens while the image is being processed.
Who it affects and how serious it is
Microsoft assigned a CVSS of 7.8 and treats it as code execution. The key detail is that the code runs with the privileges of the user who opens the file. If that user is an administrator, the attacker inherits that level; if it is a limited account, the initial blast radius stays within that account, though it remains a useful foothold for chaining further privilege escalation.
This is a classic social-engineering vector. The attacker cannot reach your machine on their own; they need someone to open the EMF. That makes it a good fit for phishing campaigns, email attachments, or disguised downloads. There was no known active exploitation at the time of the fix, and this May Patch Tuesday was the first with no zero-days since June 2024. Even so, once a patch ships the details become available to anyone building an exploit, so the quiet window does not last long.
Mitigation
The answer is straightforward: apply the May 2026 Patch Tuesday. The update fixes the GDI code that parses EMF files, so it covers Paint and any other application that renders metafiles through the same system library. If you manage a fleet, prioritise machines where users open attachments often.
Until the patch reaches every system, treat EMF files from unknown sources with suspicion and avoid opening unexpected graphics attachments. Running day-to-day with non-administrator accounts limits what a successful exploit can achieve. If your organisation filters email attachments, adding EMF to the inspected file types shrinks the attack surface.
Worth remembering: this is not a Paint-only bug. Paint is simply the easiest way to demonstrate it, but the problem lives in GDI, a component many Windows applications use without the user ever noticing.