Skip to content
Memory corruption Advisory Advanced CVE-2026-35421

Windows GDI Remote Code Execution Vulnerability (CVE-2026-35421)

A heap-based buffer overflow exists in the Windows GDI component, which can be triggered when a user opens a specially crafted Enhanced Metafile file in Microsoft Paint. An attacker who convinces a user to process such a file could execute arbitrary code on that local machine.

pwn2addr Follow

Originally disclosed on Microsoft

Critical 7.8 View original

Description

Heap-based buffer overflow in Windows GDI allows an unauthorized attacker to execute code locally.

FAQ

According to the CVSS metric, the attack vector is local (AV:L). Why does the CVE title indicate that this is a remote code execution? The word Remote in the title refers to the location of the attacker. This type of exploit is sometimes referred to as Arbitrary Code Execution (ACE). The attack itself is carried out locally. This means an attacker or victim needs to execute code from the local machine to exploit the vulnerability.

FAQ

According to the CVSS metric, user interaction is required (UI:R). What interaction would the user have to do? For this vulnerability to be exploited, a user would need to open or otherwise process a specially crafted Enhanced Metafile (EMF) file using Microsoft Paint. This action is necessary to trigger the affected graphics functionality in the Windows component.

Windows GDI

Windows GDI

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by pwn2addr. Images and videos are our own copies; raw HTML is shown as text. View it on Microsoft Security Response Center.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a heap-based buffer overflow in the Windows GDI graphics component when processing a crafted Enhanced Metafile file.

Impact

An attacker could execute arbitrary code locally on the victim's machine, but the attack requires the victim to open a crafted file in Microsoft Paint.

What the attacker needed

Victim opens a crafted EMF file in Microsoft Paint

How it was found

  1. An attacker creates a specially crafted Enhanced Metafile file.
  2. The attacker delivers the file to a victim.
  3. The victim opens or processes the file using Microsoft Paint.
  4. The affected graphics functionality is triggered and the overflow occurs.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Windows GDI is a part of Windows that draws graphics on the screen. A buffer overflow happens when a program writes more data into a memory area than it can hold, which can let an attacker take control of the program. Here, opening a malicious image file in Microsoft Paint could let an attacker run their own code on the victim's computer.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by pwn2addr

View all

71 more disclosed reports, best first.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.