.NET and Visual Studio Remote Code Execution Vulnerability
Description
.NET and Visual Studio Remote Code Execution Vulnerability
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A vulnerability in .NET source generator for P/Invokes can cause uninitialized memory to be freed, potentially leading to remote code execution.
Vulnerability
Overview
The vulnerability, identified as CVE-2023-33128, resides in the .NET source generator for Platform Invocation Services (P/Invokes). The issue occurs when the generated code frees uninitialized memory, leading to memory corruption and potentially a crash or remote code execution [1][2]. This affects .NET 7.0 SDK versions prior to 7.0.106 (1xx) and 7.0.303 (3xx), as well as corresponding runtime packages [1][2].
Exploitation
Prerequisites
Exploitation requires an attacker to craft a malicious P/Invoke call that triggers the vulnerable code path. No authentication is needed, but the attacker must be able to supply input to the P/Invoke generator. The vulnerability is present in the source generator, meaning any application using affected .NET versions that generates P/Invoke code at compile time could be vulnerable [1][2]. Microsoft has identified no mitigating factors [1].
Impact
Successful exploitation could allow an attacker to execute arbitrary code in the context of the application. The official advisory rates this as a Remote Code Execution vulnerability, though the immediate consequence of triggering the bug is a memory corruption that could be leveraged for more severe impacts [1][4].
Mitigation
Microsoft has released patched versions of .NET 7.0 (SDK 7.0.107 and 7.0.304, runtime packages 7.0.7) to address this vulnerability. Users are advised to update their .NET SDK and runtime to the latest version. Visual Studio users will be prompted to update [1][2]. No workarounds are available [1].
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.NETCore.App.Runtime.linux-armNuGet | >= 7.0.0, < 7.0.7 | 7.0.7 |
Microsoft.NETCore.App.Runtime.linux-arm64NuGet | >= 7.0.0, < 7.0.7 | 7.0.7 |
Microsoft.NETCore.App.Runtime.linux-musl-armNuGet | >= 7.0.0, < 7.0.7 | 7.0.7 |
Microsoft.NETCore.App.Runtime.linux-musl-arm64NuGet | >= 7.0.0, < 7.0.7 | 7.0.7 |
Microsoft.NETCore.App.Runtime.linux-musl-x64NuGet | >= 7.0.0, < 7.0.7 | 7.0.7 |
Microsoft.NETCore.App.Runtime.linux-x64NuGet | >= 7.0.0, < 7.0.7 | 7.0.7 |
Microsoft.NETCore.App.Runtime.osx-arm64NuGet | >= 7.0.0, < 7.0.7 | 7.0.7 |
Microsoft.NETCore.App.Runtime.osx-x64NuGet | >= 7.0.0, < 7.0.7 | 7.0.7 |
Microsoft.NETCore.App.Runtime.win-armNuGet | >= 7.0.0, < 7.0.7 | 7.0.7 |
Microsoft.NETCore.App.Runtime.win-arm64NuGet | >= 7.0.0, < 7.0.7 | 7.0.7 |
Microsoft.NETCore.App.Runtime.win-x64NuGet | >= 7.0.0, < 7.0.7 | 7.0.7 |
Microsoft.NETCore.App.Runtime.win-x86NuGet | >= 7.0.0, < 7.0.7 | 7.0.7 |
Affected products
42- osv-coords35 versionspkg:bitnami/dotnetpkg:bitnami/dotnet-sdkpkg:nuget/microsoft.netcore.app.runtime.linux-armpkg:nuget/microsoft.netcore.app.runtime.linux-arm64pkg:nuget/microsoft.netcore.app.runtime.linux-musl-armpkg:nuget/microsoft.netcore.app.runtime.linux-musl-arm64pkg:nuget/microsoft.netcore.app.runtime.linux-musl-x64pkg:nuget/microsoft.netcore.app.runtime.linux-x64pkg:nuget/microsoft.netcore.app.runtime.osx-arm64pkg:nuget/microsoft.netcore.app.runtime.osx-x64pkg:nuget/microsoft.netcore.app.runtime.win-armpkg:nuget/microsoft.netcore.app.runtime.win-arm64pkg:nuget/microsoft.netcore.app.runtime.win-x64pkg:nuget/microsoft.netcore.app.runtime.win-x86pkg:rpm/almalinux/aspnetcore-runtime-6.0pkg:rpm/almalinux/aspnetcore-runtime-7.0pkg:rpm/almalinux/aspnetcore-targeting-pack-6.0pkg:rpm/almalinux/aspnetcore-targeting-pack-7.0pkg:rpm/almalinux/dotnetpkg:rpm/almalinux/dotnet-apphost-pack-6.0pkg:rpm/almalinux/dotnet-apphost-pack-7.0pkg:rpm/almalinux/dotnet-hostpkg:rpm/almalinux/dotnet-hostfxr-6.0pkg:rpm/almalinux/dotnet-hostfxr-7.0pkg:rpm/almalinux/dotnet-runtime-6.0pkg:rpm/almalinux/dotnet-runtime-7.0pkg:rpm/almalinux/dotnet-sdk-6.0pkg:rpm/almalinux/dotnet-sdk-6.0-source-built-artifactspkg:rpm/almalinux/dotnet-sdk-7.0pkg:rpm/almalinux/dotnet-sdk-7.0-source-built-artifactspkg:rpm/almalinux/dotnet-targeting-pack-6.0pkg:rpm/almalinux/dotnet-targeting-pack-7.0pkg:rpm/almalinux/dotnet-templates-6.0pkg:rpm/almalinux/dotnet-templates-7.0pkg:rpm/almalinux/netstandard-targeting-pack-2.1
>= 6.0.0, < 6.0.18+ 34 more
- (no CPE)range: >= 6.0.0, < 6.0.18
- (no CPE)range: >= 6.0.0, < 6.0.18
- (no CPE)range: >= 7.0.0, < 7.0.7
- (no CPE)range: >= 7.0.0, < 7.0.7
- (no CPE)range: >= 7.0.0, < 7.0.7
- (no CPE)range: >= 7.0.0, < 7.0.7
- (no CPE)range: >= 7.0.0, < 7.0.7
- (no CPE)range: >= 7.0.0, < 7.0.7
- (no CPE)range: >= 7.0.0, < 7.0.7
- (no CPE)range: >= 7.0.0, < 7.0.7
- (no CPE)range: >= 7.0.0, < 7.0.7
- (no CPE)range: >= 7.0.0, < 7.0.7
- (no CPE)range: >= 7.0.0, < 7.0.7
- (no CPE)range: >= 7.0.0, < 7.0.7
- (no CPE)range: < 6.0.18-1.el9_2
- (no CPE)range: < 7.0.7-1.el9_2
- (no CPE)range: < 6.0.18-1.el9_2
- (no CPE)range: < 7.0.7-1.el9_2
- (no CPE)range: < 7.0.107-1.el8_8
- (no CPE)range: < 6.0.18-1.el9_2
- (no CPE)range: < 7.0.7-1.el9_2
- (no CPE)range: < 7.0.7-1.el9_2
- (no CPE)range: < 6.0.18-1.el9_2
- (no CPE)range: < 7.0.7-1.el9_2
- (no CPE)range: < 6.0.18-1.el9_2
- (no CPE)range: < 7.0.7-1.el9_2
- (no CPE)range: < 6.0.118-1.el9_2
- (no CPE)range: < 6.0.118-1.el9_2
- (no CPE)range: < 7.0.107-1.el9_2
- (no CPE)range: < 7.0.107-1.el9_2
- (no CPE)range: < 6.0.18-1.el9_2
- (no CPE)range: < 7.0.7-1.el9_2
- (no CPE)range: < 6.0.118-1.el9_2
- (no CPE)range: < 7.0.107-1.el9_2
- (no CPE)range: < 7.0.107-1.el9_2
- Microsoft/Microsoft Visual Studio 2022 version 17.0v5Range: 17.0.0
- Microsoft/Microsoft Visual Studio 2022 version 17.2v5Range: 17.2.0
- Microsoft/Microsoft Visual Studio 2022 version 17.4v5Range: 17.4.0
- Microsoft/Microsoft Visual Studio 2022 version 17.6v5Range: 17.6.0
- Microsoft/.NET 6.0v5Range: 6.0.0
- Microsoft/.NET 7.0v5Range: 7.0.0
- Microsoft/PowerShell 7.3v5Range: 7.3.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-x469-cv7m-77r9ghsaADVISORY
- msrc.microsoft.com/update-guide/vulnerability/CVE-2023-33128ghsavendor-advisoryWEB
- nvd.nist.gov/vuln/detail/CVE-2023-33128ghsaADVISORY
- github.com/dotnet/announcements/issues/253ghsaWEB
- github.com/dotnet/sdk/security/advisories/GHSA-x469-cv7m-77r9ghsaWEB
News mentions
0No linked articles in our index yet.