CVE-2024-21409 .NET, .NET Framework, and Visual Studio Remote Code Execution Vulnerability

High 7.3 Published Updated

A use-after-free vulnerability in .NET allows remote attackers to execute arbitrary code, requiring immediate patching of the runtime.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-21409?

CVE-2024-21409 is a high-severity use after free vulnerability in Microsoft .Net, published on 9 Apr 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

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

Weakness: CWE-416

Which versions are affected by CVE-2024-21409?

21 open source packages ship an affected version, including Microsoft.WindowsDesktop.App.Runtime.win-arm64, dotnet and dotnet-sdk. It affects 4 products.

PackageAffectedFixed in
Microsoft.WindowsDesktop.App.Runtime.win-arm64 NuGetAll versions6.0.29
Microsoft.WindowsDesktop.App.Runtime.win-arm64 NuGetAll versions6.0.29
Microsoft.WindowsDesktop.App.Runtime.win-arm64 NuGetFrom 7.0.07.0.18
Microsoft.WindowsDesktop.App.Runtime.win-arm64 NuGetFrom 7.0.07.0.18
Microsoft.WindowsDesktop.App.Runtime.win-arm64 NuGetFrom 8.0.08.0.4
Microsoft.WindowsDesktop.App.Runtime.win-arm64 NuGetFrom 8.0.08.0.4
15 more packages
dotnet BitnamiFrom 6.0.06.0.29, 7.0.18, 8.0.4
dotnet-sdk BitnamiFrom 6.0.06.0.29, 7.0.18, 8.0.4
powershell BitnamiFrom 7.2.07.2.19, 7.3.12, 7.4.2
Microsoft.WindowsDesktop.App.Runtime.win-x64 NuGetAll versions6.0.29
Microsoft.WindowsDesktop.App.Runtime.win-x64 NuGetAll versions6.0.29
Microsoft.WindowsDesktop.App.Runtime.win-x64 NuGetFrom 7.0.07.0.18
Microsoft.WindowsDesktop.App.Runtime.win-x64 NuGetFrom 7.0.07.0.18
Microsoft.WindowsDesktop.App.Runtime.win-x64 NuGetFrom 8.0.08.0.4
Microsoft.WindowsDesktop.App.Runtime.win-x64 NuGetFrom 8.0.08.0.4
Microsoft.WindowsDesktop.App.Runtime.win-x86 NuGetAll versions6.0.29
Microsoft.WindowsDesktop.App.Runtime.win-x86 NuGetAll versions6.0.29
Microsoft.WindowsDesktop.App.Runtime.win-x86 NuGetFrom 7.0.07.0.18
Microsoft.WindowsDesktop.App.Runtime.win-x86 NuGetFrom 7.0.07.0.18
Microsoft.WindowsDesktop.App.Runtime.win-x86 NuGetFrom 8.0.08.0.4
Microsoft.WindowsDesktop.App.Runtime.win-x86 NuGetFrom 8.0.08.0.4

Products include Microsoft .Net, Microsoft .Net Framework, Microsoft Powershell, Microsoft Visual Studio 2022.

How do I fix CVE-2024-21409?

Upgrade Microsoft.WindowsDesktop.App.Runtime.win-arm64 to a fixed version for your release line: 6.0.29, 7.0.18 or 8.0.4.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2024-21409 being exploited?

There is no known exploitation of CVE-2024-21409 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

All Microsoft .Net vulnerabilities

Sources

Also known as BELL-CVE-2024-21409, BIT-dotnet-2024-21409, BIT-dotnet-sdk-2024-21409, BIT-powershell-2024-21409, CLEANSTART-2025-BH85010, GHSA-6qmx-42h2-j8h6.

Is CVE-2024-21409 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free