CVE-2022-38013: Microsoft .NET stack overflow in ASP.NET Core model binding

CVE-2022-38013 · Severity: high · CVSS 7.5 · Published 2022-09-15

A vulnerability in Microsoft .NET and ASP.NET Core could allow an attacker to crash web applications remotely. By sending a specially crafted request, an attacker can trigger a system failure that makes the application unavailable to legitimate users. This affects various versions of the .NET runtime used to build and run modern Windows and Linux applications.

Technologies: Microsoft .NET Core, Microsoft Asp.Net Core, Microsoft.AspNetCore.App.Runtime.linux-arm (NuGet), Microsoft.AspNetCore.App.Runtime.linux-arm64 (NuGet), Microsoft.AspNetCore.App.Runtime.linux-musl-arm (NuGet), Microsoft.AspNetCore.App.Runtime.linux-musl-arm64 (NuGet), Microsoft.AspNetCore.App.Runtime.linux-musl-x64 (NuGet), Microsoft.AspNetCore.App.Runtime.linux-x64 (NuGet), Microsoft.AspNetCore.App.Runtime.osx-arm64 (NuGet), Microsoft.AspNetCore.App.Runtime.osx-x64 (NuGet), Microsoft.AspNetCore.App.Runtime.win-arm (NuGet), Microsoft.AspNetCore.App.Runtime.win-arm64 (NuGet), Microsoft.AspNetCore.App.Runtime.win-x64 (NuGet), Microsoft.AspNetCore.App.Runtime.win-x86 (NuGet). Vendors: Microsoft, NuGet.

Quick answers

Is CVE-2022-38013 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2022-38013 being exploited in the wild.
How severe is CVE-2022-38013?
High severity, with a CVSS score of 7.5, published 15 September 2022.
Which products and versions are affected?
Microsoft .NET Core 3.1.0 to 3.1.28; Microsoft Asp.Net Core 3.1.0 to 3.1.28, 5.0.0 to 6.0.8; Microsoft.AspNetCore.App.Runtime.linux-arm (NuGet) ECOSYSTEM:introduced=3.1.0,fixed=3.1.29; Microsoft.AspNetCore.App.Runtime.linux-arm64 (NuGet) ECOSYSTEM:introduced=3.1.0,fixed=3.1.29; and 10 more.
Is there a fix for CVE-2022-38013?
Yes. Microsoft.AspNetCore.App.Runtime.linux-arm (NuGet): upgrade to 3.1.29 or later; Microsoft.AspNetCore.App.Runtime.linux-arm64 (NuGet): upgrade to 3.1.29 or later; Microsoft.AspNetCore.App.Runtime.linux-musl-arm (NuGet): upgrade to 6.0.9 or later; Microsoft.AspNetCore.App.Runtime.linux-musl-arm64 (NuGet): upgrade to 3.1.29 or later; Microsoft.AspNetCore.App.Runtime.linux-musl-x64 (NuGet): upgrade to 3.1.29 or later; Microsoft.AspNetCore.App.Runtime.linux-x64 (NuGet): upgrade to 3.1.29 or later; Microsoft.AspNetCore.App.Runtime.osx-arm64 (NuGet): upgrade to 6.0.9 or later; Microsoft.AspNetCore.App.Runtime.osx-x64 (NuGet): upgrade to 3.1.29 or later; Microsoft.AspNetCore.App.Runtime.win-arm (NuGet): upgrade to 3.1.29 or later; Microsoft.AspNetCore.App.Runtime.win-arm64 (NuGet): upgrade to 3.1.29 or later; Microsoft.AspNetCore.App.Runtime.win-x64 (NuGet): upgrade to 3.1.29 or later; Microsoft.AspNetCore.App.Runtime.win-x86 (NuGet): upgrade to 3.1.29 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2022-38013 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2022-38013?
Check whether you run Microsoft .NET Core, Microsoft Asp.Net Core, Microsoft.AspNetCore.App.Runtime.linux-arm (NuGet) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Microsoft.AspNetCore.App.Runtime.linux-arm (NuGet): upgrade to 3.1.29 or later
    dotnet add package Microsoft.AspNetCore.App.Runtime.linux-arm --version 3.1.29
  • Microsoft.AspNetCore.App.Runtime.linux-arm64 (NuGet): upgrade to 3.1.29 or later
    dotnet add package Microsoft.AspNetCore.App.Runtime.linux-arm64 --version 3.1.29
  • Microsoft.AspNetCore.App.Runtime.linux-musl-arm (NuGet): upgrade to 6.0.9 or later
    dotnet add package Microsoft.AspNetCore.App.Runtime.linux-musl-arm --version 6.0.9
  • Microsoft.AspNetCore.App.Runtime.linux-musl-arm64 (NuGet): upgrade to 3.1.29 or later
    dotnet add package Microsoft.AspNetCore.App.Runtime.linux-musl-arm64 --version 3.1.29
  • Microsoft.AspNetCore.App.Runtime.linux-musl-x64 (NuGet): upgrade to 3.1.29 or later
    dotnet add package Microsoft.AspNetCore.App.Runtime.linux-musl-x64 --version 3.1.29
  • Microsoft.AspNetCore.App.Runtime.linux-x64 (NuGet): upgrade to 3.1.29 or later
    dotnet add package Microsoft.AspNetCore.App.Runtime.linux-x64 --version 3.1.29
  • Microsoft.AspNetCore.App.Runtime.osx-arm64 (NuGet): upgrade to 6.0.9 or later
    dotnet add package Microsoft.AspNetCore.App.Runtime.osx-arm64 --version 6.0.9
  • Microsoft.AspNetCore.App.Runtime.osx-x64 (NuGet): upgrade to 3.1.29 or later
    dotnet add package Microsoft.AspNetCore.App.Runtime.osx-x64 --version 3.1.29
  • Microsoft.AspNetCore.App.Runtime.win-arm (NuGet): upgrade to 3.1.29 or later
    dotnet add package Microsoft.AspNetCore.App.Runtime.win-arm --version 3.1.29
  • Microsoft.AspNetCore.App.Runtime.win-arm64 (NuGet): upgrade to 3.1.29 or later
    dotnet add package Microsoft.AspNetCore.App.Runtime.win-arm64 --version 3.1.29
  • Microsoft.AspNetCore.App.Runtime.win-x64 (NuGet): upgrade to 3.1.29 or later
    dotnet add package Microsoft.AspNetCore.App.Runtime.win-x64 --version 3.1.29
  • Microsoft.AspNetCore.App.Runtime.win-x86 (NuGet): upgrade to 3.1.29 or later
    dotnet add package Microsoft.AspNetCore.App.Runtime.win-x86 --version 3.1.29

Technical details

A denial of service (DoS) vulnerability exists in ASP.NET Core and .NET due to improper handling of deeply nested or complex payloads during the model binding process. An unauthenticated remote attacker can exploit this by sending a customized payload that, when parsed, triggers a stack overflow. This results in the immediate termination of the affected process. The vulnerability specifically impacts the model binding component in ASP.NET Core 3.1 and .NET 6.0. Microsoft has released patches (3.1.29 and 6.0.9) to address this issue by improving resource management during parsing.

Affected products

  • Microsoft .NET Core 3.1.0 to 3.1.28
  • Microsoft .NET 5.0.0 to 6.0.8
  • Microsoft ASP.NET Core 3.1.0 to 3.1.28, 5.0.0 to 6.0.8

Identifiers

  • CVE-2022-38013
  • GHSA-r8m2-4x37-6592

Timeline

  • 2022-09-13: advisory: Initial Microsoft MSRC advisory published
  • 2022-09-15: disclosed: GitHub Advisory published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.