CVE-2026-50650: WPF XAML Code Injection Elevation of Privilege
A specially crafted XAML file fed to a WPF application can trigger code injection that elevates the attacker's privileges on the local Windows system.
The problem
Windows Presentation Foundation (WPF) in .NET 8, 9, and 10 does not sufficiently restrict what can be instantiated or invoked when parsing XAML input. An attacker who can cause a WPF application to parse a crafted .xaml file can inject and execute arbitrary code in the context of that process.
The vulnerability requires local access and user interaction (opening or previewing a malicious file), matching the CVSS vector AV:L/AC:L/PR:N/UI:R. Successful exploitation gives full confidentiality, integrity, and availability impact, earning a CVSS 3.1 score of 7.8 (High).
The fix
Update to the patched runtime for your .NET version: .NET 10.0.10, .NET 9.0.18, or .NET 8.0.29. Self-contained applications must be recompiled and redeployed against the patched SDK. Run dotnet --info to confirm your installed version. If you deploy WPF apps that parse user-supplied XAML, validate and restrict XAML sources as a defense-in-depth measure regardless of patch status.
Reported by bribrothers.
Related research
- highCVE-2026-59866CVE-2026-59866: Microsoft Kiota Arbitrary File Write and Code Injection via x-ms-kiota-info
- criticalCVE-2026-59865CVE-2026-59865: Microsoft Kiota Command Injection via x-ms-kiota-info dependencyInstallCommand
- highCVE-2026-59860CVE-2026-59860: Microsoft.OpenApi.Kiota XML Doc-Comment Newline Breakout Code Injection
- high · 7.5CVE-2026-59862CVE-2026-59862: Microsoft Kiota Python Generator Code Injection via Enum Description