.NET, .NET Framework, and Visual Studio Remote Code Execution Vulnerability
Description
.NET, .NET Framework, and Visual Studio Remote Code Execution Vulnerability
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A use-after-free vulnerability in WPF (Windows Presentation Foundation) allows remote code execution via untrusted documents on .NET 6.0, 7.0, and 8.0.
Vulnerability
Overview
CVE-2024-21409 is a use-after-free vulnerability in Windows Presentation Foundation (WPF), a .NET UI framework for building Windows desktop applications [3]. The flaw occurs when WPF processes untrusted documents, leading to a use-after-free condition that can be exploited for remote code execution [1][2]. This issue affects .NET 6.0 (up to 6.0.28), .NET 7.0 (up to 7.0.17), and .NET 8.0 (up to 8.0.3) on Windows systems [2].
Exploitation
Conditions
An attacker can trigger the vulnerability by convincing a user to open a specially crafted, untrusted document in a WPF-based application [2]. No authentication or special privileges are required beyond user interaction. The attack surface is limited to WPF applications running on Windows; the vulnerability does not affect non-WPF .NET workloads or cross-platform scenarios [2].
Impact
Successful exploitation allows an attacker to execute arbitrary code in the context of the logged-on user [1]. Depending on the user's privileges, this could result in data disclosure, system compromise, or further lateral movement within the network. Microsoft has assessed the severity as high, with a CVSS v3.1 base score of 7.8 [1].
Mitigation
Microsoft has released patched versions for all affected .NET runtimes and SDKs: .NET 6.0.29, .NET 7.0.18, and .NET 8.0.4 [2]. Developers should update their applications to these versions or later. For package-based deployments, the affected NuGet packages (Microsoft.WindowsDesktop.App.Runtime) have been updated accordingly [2]. There are no workarounds; applying the patch is the only recommended mitigation.
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
Microsoft.WindowsDesktop.App.Runtime.win-arm64NuGet | < 6.0.29 | 6.0.29 |
Microsoft.WindowsDesktop.App.Runtime.win-arm64NuGet | >= 8.0.0, < 8.0.4 | 8.0.4 |
Microsoft.WindowsDesktop.App.Runtime.win-arm64NuGet | >= 7.0.0, < 7.0.18 | 7.0.18 |
Microsoft.WindowsDesktop.App.Runtime.win-x64NuGet | < 6.0.29 | 6.0.29 |
Microsoft.WindowsDesktop.App.Runtime.win-x64NuGet | >= 8.0.0, < 8.0.4 | 8.0.4 |
Microsoft.WindowsDesktop.App.Runtime.win-x64NuGet | >= 7.0.0, < 7.0.18 | 7.0.18 |
Microsoft.WindowsDesktop.App.Runtime.win-x86NuGet | >= 7.0.0, < 7.0.18 | 7.0.18 |
Microsoft.WindowsDesktop.App.Runtime.win-x86NuGet | >= 8.0.0, < 8.0.4 | 8.0.4 |
Microsoft.WindowsDesktop.App.Runtime.win-x86NuGet | < 6.0.29 | 6.0.29 |
Affected products
22- osv-coords6 versionspkg:bitnami/dotnetpkg:bitnami/dotnet-sdkpkg:bitnami/powershellpkg:nuget/microsoft.windowsdesktop.app.runtime.win-arm64pkg:nuget/microsoft.windowsdesktop.app.runtime.win-x64pkg:nuget/microsoft.windowsdesktop.app.runtime.win-x86
>= 6.0.0, < 6.0.29+ 5 more
- (no CPE)range: >= 6.0.0, < 6.0.29
- (no CPE)range: >= 6.0.0, < 6.0.29
- (no CPE)range: >= 7.2.0, < 7.2.19
- (no CPE)range: < 6.0.29
- (no CPE)range: < 6.0.29
- (no CPE)range: >= 7.0.0, < 7.0.18
- Microsoft/Microsoft .NET Framework 3.5 AND 4.7.2v5Range: 4.7.0
- Microsoft/Microsoft .NET Framework 3.5 AND 4.8v5Range: 4.8.0
- Microsoft/Microsoft .NET Framework 3.5 AND 4.8.1v5Range: 4.8.1
- Microsoft/Microsoft .NET Framework 4.6.2v5Range: 4.7.0
- Microsoft/Microsoft .NET Framework 4.6.2/4.7/4.7.1/4.7.2v5Range: 4.7.0
- Microsoft/Microsoft .NET Framework 4.8v5Range: 4.8.0
- Microsoft/Microsoft Visual Studio 2022 version 17.4v5Range: 17.4.0
- Microsoft/Microsoft Visual Studio 2022 version 17.6v5Range: 17.6.0
- Microsoft/Microsoft Visual Studio 2022 version 17.8v5Range: 17.8.0
- Microsoft/Microsoft Visual Studio 2022 version 17.9v5Range: 17.0
- Microsoft/.NET 6.0v5Range: 6.0.0
- Microsoft/.NET 7.0v5Range: 7.0.0
- Microsoft/.NET 8.0v5Range: 8.0
- Microsoft/PowerShell 7.2v5Range: 7.2.0
- Microsoft/PowerShell 7.3v5Range: 7.3.0
- Microsoft/PowerShell 7.4v5Range: 7.4.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-6qmx-42h2-j8h6ghsaADVISORY
- msrc.microsoft.com/update-guide/vulnerability/CVE-2024-21409ghsavendor-advisoryWEB
- nvd.nist.gov/vuln/detail/CVE-2024-21409ghsaADVISORY
- github.com/dotnet/wpf/security/advisories/GHSA-6qmx-42h2-j8h6ghsaWEB
- security.netapp.com/advisory/ntap-20250117-0002ghsaWEB
News mentions
0No linked articles in our index yet.