Cybersecurity

Protecting Your ASP.NET Core Applications: Applying the .NET 10.0.7 Out-of-Band Security Patch

2026-05-05 02:46:49

Introduction

If you work with ASP.NET Core and rely on Microsoft.AspNetCore.DataProtection, you need to act quickly. An out-of-band (OOB) security update — .NET 10.0.7 — has been released to fix a serious vulnerability (CVE-2026-40372) that could allow an attacker to gain elevated privileges. The issue was discovered after the Patch Tuesday release of .NET 10.0.6, when some customers reported decryption failures. Investigation revealed a regression: in versions 10.0.0 through 10.0.6, the managed authenticated encryptor could compute its HMAC validation tag over the wrong bytes of the payload and then discard the computed hash. This flaw could lead to an elevation of privilege. This guide will walk you through updating your environment and applications to close the security gap.

Protecting Your ASP.NET Core Applications: Applying the .NET 10.0.7 Out-of-Band Security Patch
Source: devblogs.microsoft.com

What You Need

Step-by-Step Guide

Step 1: Verify Your Current .NET Version

Before making any changes, confirm which version of the .NET SDK or runtime you are using. Open a terminal or command prompt and run:

dotnet --info

Look for the SDK and runtime version numbers. If they show 10.0.0, 10.0.1, …, or 10.0.6, you are vulnerable and must update to 10.0.7. If you see 10.0.7, you’re already covered (though you may still need to update the NuGet package in your projects).

Step 2: Update the Microsoft.AspNetCore.DataProtection NuGet Package

The vulnerability directly affects the Microsoft.AspNetCore.DataProtection package. Open your project solution and update the package reference to version 10.0.7. You can do this via the NuGet Package Manager in Visual Studio, the .NET CLI, or by editing your .csproj file.

After updating, restore the packages:

dotnet restore

Step 3: Update the .NET SDK and Runtime to 10.0.7

While the package update is critical, you should also update the SDK and runtime to ensure consistency across your environment. Download the appropriate installer from the official .NET download page (https://dotnet.microsoft.com/download/dotnet/10.0). Choose the version 10.0.7 for your operating system (Windows, macOS, Linux).

Step 4: Confirm the Update

After installation, verify that the new version is active. Run:

dotnet --info

The output should show 10.0.7 for both the SDK version and the runtime version. Also check the package version in your project by reviewing the .csproj file or using the Package Manager Console.

Protecting Your ASP.NET Core Applications: Applying the .NET 10.0.7 Out-of-Band Security Patch
Source: devblogs.microsoft.com

Step 5: Rebuild and Redeploy Your Application

Now that your development environment is updated, rebuild your application. Use the following commands (adjust for your project type):

dotnet clean
dotnet build
dotnet run

If you are deploying container images, update your Docker base image to mcr.microsoft.com/dotnet/aspnet:10.0.7 (or the SDK variant for build stages). For Linux packages, update your package references accordingly. Rebuild your containers and push the new images to your registry.

Step 6: Test Decryption Functionality

The original issue was reported as decryption failures. After applying the patch, thoroughly test any features that rely on data protection, such as:

Run automated tests and manually verify that encryption and decryption work correctly. If you were experiencing decryption errors before, they should now be resolved.

Step 7: Report Any Issues

If you encounter new problems after the update, please report them to the .NET team via the ASP.NET Core issue tracker with the label release-feedback. Provide detailed steps to reproduce and include your environment information. The team actively monitors feedback for OOB releases.

Tips for a Smooth Update

By following these steps, you’ll close the CVE-2026-40372 vulnerability and restore secure decryption in your ASP.NET Core applications. Don’t delay — update today.

Explore

Kubernetes v1.36 Introduces Flexible Resource Tuning for Suspended Jobs (Beta) Meta Advances End-to-End Encrypted Backup Security with New Fleet Features 10 Essentials for Coordinating Multiple AI Agents at Scale 10 Key Insights: How Kubernetes Became the Backbone of AI docs.rs Streamlines Documentation Builds: Default Target Reduction Coming in 2026