Skip to content
Access control Write-up Advanced

Privilege escalation using the XAML diagnostics API (CVE-2023-36003)

The InitializeXamlDiagnosticsEx API lacked security checks, allowing a non-elevated process to inject a DLL into an elevated process. An attacker could exploit this to escalate privileges by targeting elevated XAML-based applications such as Task Manager or Windows Terminal.

Michael Maltsev Follow

Published on m417z.com

This is a write-up of a vulnerability that I discovered in Windows. The vulnerability was patched in December’s Patch Tuesday, and the CVE assigned to it is CVE-2023-36003.

m417z / blog, on m417z.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

How it worked

Root cause

The InitializeXamlDiagnosticsEx API lacked basic security checks, allowing any process to inject a DLL into another process.

What the attacker needed

Target runs a XAML-based elevated process; Attacker can run a non-elevated process

The fix

The fix added a security descriptor based on the process token when creating the connection port and a privilege check in OnVisualDiagInit; the patch was released in December's Patch Tuesday.

How it was found

  1. Launch an elevated XAML-based process such as Task Manager or Windows Terminal.
  2. Call the InitializeXamlDiagnosticsEx API targeting that process.
  3. The API loads the attacker's DLL into the elevated process, achieving privilege escalation.

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 write-up has not been written yet. The Original tab links to the source.

This bug lets a normal program trick a more powerful program into loading the attacker's code. Normally, Windows prevents low-privilege programs from interfering with high-privilege ones, but a diagnostic feature for XAML apps (used for building user interfaces) did not check who was asking. So an attacker could run code with the same high privileges as the target program.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Microsoft (Windows)

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.