ASP.NET Core Flaw Hits Linux and macOS With Privilege Escalation

What Actually Happened: The Emergency Patch in Plain English Microsoft did not wait for Patch Tuesday. The company pushed an out-of-band emergency update for ASP.NET Core — the kind of unscheduled release reserved for vulnerabilities too dangerous to sit on a calendar. The vulnerability at the center of this, CVE-2026-40372, lives inside the Microsoft.AspNetCore.DataProtection NuGet ... Read more

ASP.NET Core Flaw Hits Linux and macOS With Privilege Escalation

What Actually Happened: The Emergency Patch in Plain English

Microsoft did not wait for Patch Tuesday. The company pushed an out-of-band emergency update for ASP.NET Core — the kind of unscheduled release reserved for vulnerabilities too dangerous to sit on a calendar.

The vulnerability at the center of this, CVE-2026-40372, lives inside the Microsoft.AspNetCore.DataProtection NuGet package, versions 10.0.0 through 10.0.6. That package exists specifically to encrypt and protect sensitive application data — authentication tokens, session state, anything your app needs to keep private. The irony is direct: the component built to secure data became the attack surface.

The root cause is a broken cryptographic signature check. The package performs HMAC validation to verify that data exchanged between a client and server is authentic and untampered. Due to faulty verification logic, an attacker can forge authentication payloads that pass that check. The application accepts the forged credentials as legitimate.

What happens next is the part that should stop developers cold. An attacker needs zero credentials to pull this off — no username, no password, no session token. They send a crafted request, the broken HMAC check waves it through, and the forged payload grants them SYSTEM-level privileges. SYSTEM is the highest access tier on the machine. At that point, the attacker owns the host: reading files, executing code, modifying configurations, pivoting to other systems on the network.

This is not a Windows-only problem. The affected apps are running on Linux and macOS — platforms many developers have historically treated as insulated from Microsoft-ecosystem privilege escalation attacks. That assumption is wrong. ASP.NET Core is cross-platform by design, and so is this vulnerability. Any Linux or macOS host running an application built on the affected DataProtection package versions is exposed.

The fix is version 10.0.7 of the package, available now through NuGet. Developers running anything between 10.0.0 and 10.0.6 need to update immediately.

The Missing Context: This Is a Cross-Platform Microsoft Vulnerability

For years, the implicit assumption among developers deploying ASP.NET Core on Linux or macOS was straightforward: Microsoft’s most dangerous privilege escalation bugs were a Windows problem. CVE-2026-40372 dismantles that assumption completely. Microsoft’s emergency patch targets Linux and macOS deployments exclusively, and most coverage has buried that detail beneath generic “ASP.NET vulnerability” framing that obscures who is actually at risk.

The developers most directly exposed are the ones who made a deliberate architectural choice. Choosing Linux or macOS as the runtime environment for ASP.NET Core often came down to cost, licensing efficiency, or the belief that non-Windows infrastructure carried a lower Microsoft-ecosystem attack surface. That reasoning now has a critical gap in it. The vulnerability grants unauthenticated attackers SYSTEM-level privileges on the host — the highest level of access available — and it requires no valid credentials to trigger.

The affected component is not a niche library that only specialized applications pull in. Microsoft.AspNetCore.DataProtection, versions 10.0.0 through 10.0.6, is the package responsible for session management, authentication token handling, and cookie encryption across a massive portion of production ASP.NET Core applications. Any web app that authenticates users, maintains session state, or issues encrypted cookies has DataProtection operating underneath it. The flaw itself lives in the HMAC validation process — the cryptographic mechanism that verifies the integrity and authenticity of data moving between client and server. A faulty signature verification check means attackers can forge authentication payloads that the application accepts as legitimate.

The consequence is not a theoretical escalation chain requiring multiple steps. Forged credentials produced by exploiting this flaw survive the validation process, meaning an attacker without any existing access can manufacture trusted identity artifacts and interact with the application as a fully authenticated — and potentially privileged — user. On Linux and macOS servers running affected versions, that path leads directly to SYSTEM privileges on the underlying machine.

How the Flaw Works: What ‘Faulty Verification’ Really Means

The vulnerability lives inside Microsoft.AspNetCore.DataProtection, a NuGet package included in ASP.NET Core versions 10.0.0 through 10.0.6. This package handles encryption and integrity verification for data moving between clients and servers — cookies, session tokens, and other protected payloads. The flaw is a broken HMAC validation process. HMAC (Hash-based Message Authentication Code) is the cryptographic mechanism the framework uses to confirm that a payload hasn’t been tampered with and came from a legitimate source. The bug allows an attacker to forge authentication payloads that pass this verification check, meaning the server accepts crafted data as genuine even though it was constructed entirely by an outsider.

No credentials are required to trigger this. An attacker facing a web-exposed application running the vulnerable package can send a specially crafted request directly and the server processes it as trusted. There is no prerequisite step — no stolen password, no phished session token, no pivot through a compromised adjacent system. The application itself is the entry point.

What the attacker receives at the end of a successful exploit is SYSTEM-level access. On Linux and macOS, SYSTEM is the equivalent of root — the highest privilege tier on the operating system. That means complete control over every file the server holds, every process it runs, and every credential or secret stored on the host. From that position, an attacker can read database connection strings, extract private keys, plant persistent backdoors, and use the compromised server as a launchpad for lateral movement across the internal network.

The word “faulty verification” in Microsoft’s advisory understates the practical consequence. The HMAC check is supposed to be the trust boundary between an untrusted client and a privileged server process. When that boundary fails silently — accepting forged signatures as valid — every layer of application-level security built on top of it collapses with it. Authentication logic, authorization checks, and session management all assume the underlying cryptographic verification is sound. CVE-2026-40372 removes that assumption entirely.

Who Is Actually at Risk — and How to Know If You Are

Any organization running ASP.NET Core versions 10.0.0 through 10.0.6 on Linux or macOS servers with internet-facing applications needs to patch immediately. This is not a scheduled maintenance item — CVE-2026-40372 allows unauthenticated attackers to gain SYSTEM-level privileges without valid credentials, and the vulnerable surface is the Microsoft.AspNetCore.DataProtection NuGet package that ships as part of the framework itself.

The risk extends directly into containerized and cloud-hosted environments. Docker on Linux is one of the most common deployment patterns for ASP.NET Core in production, and every container image built on an affected version of the NuGet package carries the vulnerability regardless of what operating system patches exist at the host level. Updating the underlying Linux host does nothing here — the flaw lives inside the application’s dependency, not the OS. Teams running containerized workloads need to rebuild their images against a clean, patched version of the package, then redeploy.

Checking exposure is straightforward. Inspect the project’s NuGet package lock files to identify which version of Microsoft.AspNetCore.DataProtection is resolved at build time. Running a dependency audit through the .NET CLI will surface the same information. Any resolved version between 10.0.0 and 10.0.6 confirms exposure. Teams that rely on transitive dependencies — where the vulnerable package is pulled in by another library rather than referenced directly — need to be especially thorough, because the package version may not be obvious from a top-level project file alone.

Internal-only applications are a lower priority, but organizations that expose any ASP.NET Core endpoints to the public internet on Linux or macOS should treat this as a drop-everything patch. The combination of no authentication requirement, SYSTEM-level access on compromise, and a faulty HMAC validation path that lets attackers forge credentials means the attack barrier is unusually low. Waiting for a regular patch cycle is not an acceptable response here.

The Bigger Story: Microsoft’s Cross-Platform Expansion Creates Cross-Platform Risk

Microsoft spent the last decade deliberately courting Linux-first engineering teams by positioning .NET and ASP.NET Core as fully cross-platform frameworks. That strategy worked. Enterprise cloud development shops running Ubuntu, RHEL, and macOS adopted ASP.NET Core in large numbers, deploying it inside containers on AWS, Azure, and Google Cloud. CVE-2026-40372 is the direct consequence of that success: the broader the adoption, the wider the blast radius when a critical flaw ships inside a core package like Microsoft.AspNetCore.DataProtection.

The security assumption that failed developers here is a common one. Linux and macOS environments carry genuine security advantages — stricter default permissions, a smaller Windows-specific attack surface, mature audit tooling. Developers working in those environments reasonably trust the OS layer. What CVE-2026-40372 demonstrates is that the OS layer was never the problem. The vulnerability lived inside a Microsoft-supplied NuGet package running on top of that OS, and no Linux kernel hardening or macOS sandboxing policy stopped an unauthenticated attacker from forging HMAC-validated authentication payloads and escalating to SYSTEM privileges. The operating system did its job. The package did not.

That distinction demands a change in how security teams structure their software composition analysis programs. Most mature SCA pipelines already scan open-source dependencies on NuGet, npm, and PyPI for known CVEs. Microsoft’s own packages — distributed through the same NuGet registry — have historically received less scrutiny because they carry an implicit trust association with a major vendor. CVE-2026-40372 kills that assumption. Microsoft.AspNetCore.DataProtection versions 10.0.0 through 10.0.6 sat in production pipelines across Linux and macOS deployments carrying a flaw that handed unauthenticated attackers full system access.

Security teams need to add Microsoft-published NuGet packages to SCA tooling with explicit version-pinning policies and automated alerts for emergency patches. Vendor origin does not equal security. The package is the dependency, and the dependency needs to be tracked.

AI-Assisted Content — This article was produced with AI assistance. Sources are cited below. Factual claims are verified automatically; uncertain claims are flagged for human review. Found an error? Contact us or read our AI Disclosure.
#aspnet core #linux security #microsoft vulnerabilities #patch management #privilege escalation