CVE-2026-50650

Improper Control of Generation of Code ('Code Injection')
Affects
.NET (Windows Presentation Foundation)
in
.NET
No items found.
Versions
>= 6.0.0 <= 6.0.42
Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

.NET is a free, open-source, cross-platform framework for building modern apps and powerful cloud services. It consists of a runtime and a developer platform made up of tools, programming languages, and libraries for building many different types of applications.

An elevation of privilege vulnerability (CVE-2026-50650) has been identified in the XAML parser of Windows Presentation Foundation (WPF), which allows an attacker to run code with the privileges of the host application by supplying crafted XAML that instantiates dangerous types during parsing.

Per CWE-94: Improper Control of Generation of Code ('Code Injection'), the product constructs all or part of a code segment using externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

This issue affects Windows Presentation Foundation (WPF) on .NET 6. WPF is Windows-only, and exploitation requires a local attack vector and user interaction — a user must open or load the crafted markup.

Details

Module Info

  • Product: .NET (Windows Presentation Foundation)
  • Affected packages: Microsoft.WindowsDesktop.App.Runtime.win-x64
  • Affected versions: >= 6.0.0 <= 6.0.42
  • GitHub repository: https://github.com/dotnet/wpf
  • Published packages: Download .NET (Linux, macOS, and Windows)
  • Package manager: NuGet
  • Fixed in: NES for .NET 6.0.43

Vulnerability Info

This High-severity vulnerability is found in the XAML loading paths of Windows Presentation Foundation (WPF) in .NET 6. Certain embedded-XAML load paths do not enforce the restrictive XAML reader, so markup from an untrusted or attacker-controllable source is parsed with the permissive reader. Because XAML is itself executable markup — object graphs are instantiated and members invoked as the parser walks the document — a crafted payload can cause the loader to construct types such as ObjectDataProvider that invoke arbitrary methods. The injected markup therefore executes with the privileges of the host application, elevating the attacker's privileges to those of the process that loaded the markup.

CVE-2026-50646, CVE-2026-50649 and CVE-2026-50650 were reported separately and are addressed together by the same XAML restrictive-reader hardening in NES for .NET 6.0.43.

This vulnerability has been present since at least .NET (WPF) 6.0 and likely earlier.

Mitigation

.NET 6 is End-of-Life and will not receive any updates to address this issue. For more information see .NET and .NET Core official support policy.

Users of the affected components should apply one of the following mitigations:

  • Upgrade affected applications to one of:
    • .NET Desktop Runtime >= 8.0.29
    • .NET Desktop Runtime >= 9.0.18
    • .NET Desktop Runtime >= 10.0.10
  • Leverage a commercial support partner like HeroDevs for post-EOL security support, including NES for .NET 6.0.43 or later.

Credits

Microsoft did not publicly credit an individual finder for this vulnerability in its security advisory.

Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
High
ID
CVE-2026-50650
PROJECT Affected
.NET (Windows Presentation Foundation)
Versions Affected
>= 6.0.0 <= 6.0.42
NES Versions Affected
Published date
August 3, 2026
≈ Fix date
July 16, 2026
Fixed in
Category
Improper Control of Generation of Code ('Code Injection')
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for .NET
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.