VYPR
High severityNVD Advisory· Published Apr 9, 2024· Updated May 3, 2025

.NET, .NET Framework, and Visual Studio Remote Code Execution Vulnerability

CVE-2024-21409

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.

PackageAffected versionsPatched versions
Microsoft.WindowsDesktop.App.Runtime.win-arm64NuGet
< 6.0.296.0.29
Microsoft.WindowsDesktop.App.Runtime.win-arm64NuGet
>= 8.0.0, < 8.0.48.0.4
Microsoft.WindowsDesktop.App.Runtime.win-arm64NuGet
>= 7.0.0, < 7.0.187.0.18
Microsoft.WindowsDesktop.App.Runtime.win-x64NuGet
< 6.0.296.0.29
Microsoft.WindowsDesktop.App.Runtime.win-x64NuGet
>= 8.0.0, < 8.0.48.0.4
Microsoft.WindowsDesktop.App.Runtime.win-x64NuGet
>= 7.0.0, < 7.0.187.0.18
Microsoft.WindowsDesktop.App.Runtime.win-x86NuGet
>= 7.0.0, < 7.0.187.0.18
Microsoft.WindowsDesktop.App.Runtime.win-x86NuGet
>= 8.0.0, < 8.0.48.0.4
Microsoft.WindowsDesktop.App.Runtime.win-x86NuGet
< 6.0.296.0.29

Affected products

22
  • osv-coords6 versions
    >= 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.2v5
    Range: 4.7.0
  • Microsoft/Microsoft .NET Framework 3.5 AND 4.8v5
    Range: 4.8.0
  • Microsoft/Microsoft .NET Framework 3.5 AND 4.8.1v5
    Range: 4.8.1
  • Microsoft/Microsoft .NET Framework 4.6.2v5
    Range: 4.7.0
  • Microsoft/Microsoft .NET Framework 4.6.2/4.7/4.7.1/4.7.2v5
    Range: 4.7.0
  • Microsoft/Microsoft .NET Framework 4.8v5
    Range: 4.8.0
  • Microsoft/Microsoft Visual Studio 2022 version 17.4v5
    Range: 17.4.0
  • Microsoft/Microsoft Visual Studio 2022 version 17.6v5
    Range: 17.6.0
  • Microsoft/Microsoft Visual Studio 2022 version 17.8v5
    Range: 17.8.0
  • Microsoft/Microsoft Visual Studio 2022 version 17.9v5
    Range: 17.0
  • Microsoft/.NET 6.0v5
    Range: 6.0.0
  • Microsoft/.NET 7.0v5
    Range: 7.0.0
  • Microsoft/.NET 8.0v5
    Range: 8.0
  • Microsoft/PowerShell 7.2v5
    Range: 7.2.0
  • Microsoft/PowerShell 7.3v5
    Range: 7.3.0
  • Microsoft/PowerShell 7.4v5
    Range: 7.4.0

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

5

News mentions

0

No linked articles in our index yet.