CVE-2021-31957
ASP.NET Core Denial of Service Vulnerability
ASP.NET Core Denial of Service Vulnerability
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
5.9
ASP.NET Core Denial of Service Vulnerability
ASP.NET Core Denial of Service Vulnerability
- Record
CVE-2021-31957- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H/E:U/RL:O/RC:C - Weakness
- CWE-400
- Updated
- 2026-11-02
EUVDEUVD-2021-2231
5.9
ASP.NET Core Denial of Service Vulnerability
- Record
EUVD-2021-2231- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H/E:U/RL:O/RC:C - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-mcwm-2wmc-6hv4
7.5
ASP.NET Core Denial of Service Vulnerability
Withdrawn
This advisory was initially published and mapped incorrectly to nuget Microsoft.NETCore.App.Ref. We later reanalyzed this advisory and found it does not have a direct mapping to a NuGet package. Thus we have withdrawn this advisory.
The underlying ASP.NET Core Denial of Service Vulnerability and CVE-2021-31957 remain legitimate.
Description.
Microsoft is releasing this security advisory to provide information about a vulnerability in .NET 5.0 and .NET Core 3.1. This advisory also provides guidance on what developers can do to update their applications to remove this vulnerability.
A denial of service vulnerability exists when ASP.NET Core improperly handles client disconnect. An attacker who successfully exploited this vulnerability could cause a denial of service against an ASP.NET Core web application. The vulnerability can be exploited remotely, without authentication.
Patches
-
If you're using .NET 5.0, you should download and install Runtime 5.0.7 or SDK 5.0.204 (for Visual Studio 2019 v16.8) or SDK 5.0.301 (for Visual Studio 2019 16.10) from https://dotnet.microsoft.com/download/dotnet-core/5.0.
-
If you're using .NET Core 3.1, you should download and install Runtime 3.1.16 or SDK 3.1.116 (for Visual Studio 2019 v16.4) or 3.1.410 (for Visual Studio 2019 v16.5 or later) from https://dotnet.microsoft.com/download/dotnet-core/3.1.
Other Details
- Announcement for this issue can be found at https://github.com/dotnet/announcements/issues/188
- An Issue for this can be found at https://github.com/dotnet/aspnetcore/issues/33369
- MSRC details for this can be found at https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2021-31957
- Record
GHSA-mcwm-2wmc-6hv4- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
NVD
5.9
ASP.NET Core Denial of Service Vulnerability
- Record
CVE-2021-31957- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:N/I:N/A:P - Weakness
- CWE-400
- Updated
- 2026-11-02
OSV
5.9
ASP.NET Core Denial of Service Vulnerability
- Record
CVE-2021-31957- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVGHSA-mcwm-2wmc-6hv4
7.5
ASP.NET Core Denial of Service Vulnerability
Withdrawn
This advisory was initially published and mapped incorrectly to nuget Microsoft.NETCore.App.Ref. We later reanalyzed this advisory and found it does not have a direct mapping to a NuGet package. Thus we have withdrawn this advisory.
The underlying ASP.NET Core Denial of Service Vulnerability and CVE-2021-31957 remain legitimate.
Description.
Microsoft is releasing this security advisory to provide information about a vulnerability in .NET 5.0 and .NET Core 3.1. This advisory also provides guidance on what developers can do to update their applications to remove this vulnerability.
A denial of service vulnerability exists when ASP.NET Core improperly handles client disconnect. An attacker who successfully exploited this vulnerability could cause a denial of service against an ASP.NET Core web application. The vulnerability can be exploited remotely, without authentication.
Patches
-
If you're using .NET 5.0, you should download and install Runtime 5.0.7 or SDK 5.0.204 (for Visual Studio 2019 v16.8) or SDK 5.0.301 (for Visual Studio 2019 16.10) from https://dotnet.microsoft.com/download/dotnet-core/5.0.
-
If you're using .NET Core 3.1, you should download and install Runtime 3.1.16 or SDK 3.1.116 (for Visual Studio 2019 v16.4) or 3.1.410 (for Visual Studio 2019 v16.5 or later) from https://dotnet.microsoft.com/download/dotnet-core/3.1.
Other Details
- Announcement for this issue can be found at https://github.com/dotnet/announcements/issues/188
- An Issue for this can be found at https://github.com/dotnet/aspnetcore/issues/33369
- MSRC details for this can be found at https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2021-31957
- Record
GHSA-mcwm-2wmc-6hv4- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Show 6 moreShow less
OSVRHSA-2021:2350
5.9
Red Hat Security Advisory: .NET Core 3.1 on RHEL 7 security and bugfix update
- Record
RHSA-2021:2350- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVRHSA-2021:2351
5.9
Red Hat Security Advisory: .NET 5.0 on RHEL 7 security and bugfix update
- Record
RHSA-2021:2351- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVRHSA-2021:2352
5.9
Red Hat Security Advisory: .NET Core 3.1 security and bugfix update
- Record
RHSA-2021:2352- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVRHSA-2021:2353
5.9
Red Hat Security Advisory: .NET 5.0 security and bugfix update
- Record
RHSA-2021:2353- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVBIT-dotnet-2021-31957 No score
ASP.NET Core Denial of Service Vulnerability
ASP.NET Core Denial of Service Vulnerability
- Record
BIT-dotnet-2021-31957- Updated
- 2026-11-02
OSVBIT-dotnet-sdk-2021-31957 No score
ASP.NET Core Denial of Service Vulnerability
ASP.NET Core Denial of Service Vulnerability
- Record
BIT-dotnet-sdk-2021-31957- Updated
- 2026-11-02
Affected products
- microsoft .net
- microsoft .net core
- microsoft .net 5.0
- microsoft .net core 3.1
- microsoft visual studio 2019 version 16.10 (includes 16.0 - 16.9)
- microsoft visual studio 2019 version 16.4 (includes 16.0 - 16.3)
- microsoft visual studio 2019 version 16.7 (includes 16.0 – 16.6)
- microsoft visual studio 2019 version 16.9 (includes 16.0 - 16.8)
- microsoft visual studio 2019 for mac version 8.10
- microsoft visual studio 2019
- fedoraproject fedora
Affected packages
| Package | Affected | Fixed |
|---|---|---|
dotnetBitnami |
5.0.0 up to 5.0.7 | 5.0.7 |
dotnet-sdkBitnami |
5.0.0 up to 5.0.7 | 5.0.7 |
rh-dotnet31-aspnetcore-runtime-3.1Red Hat:rhel_dotnet:3.1::el7 |
before 0:3.1.16-1.el7_9 | 0:3.1.16-1.el7_9 |
rh-dotnet31-aspnetcore-targeting-pack-3.1Red Hat:rhel_dotnet:3.1::el7 |
before 0:3.1.16-1.el7_9 | 0:3.1.16-1.el7_9 |
rh-dotnet31-dotnetRed Hat:rhel_dotnet:3.1::el7 |
before 0:3.1.116-1.el7_9 | 0:3.1.116-1.el7_9 |
rh-dotnet31-dotnet-apphost-pack-3.1Red Hat:rhel_dotnet:3.1::el7 |
before 0:3.1.16-1.el7_9 | 0:3.1.16-1.el7_9 |
rh-dotnet31-dotnet-debuginfoRed Hat:rhel_dotnet:3.1::el7 |
before 0:3.1.116-1.el7_9 | 0:3.1.116-1.el7_9 |
rh-dotnet31-dotnet-hostRed Hat:rhel_dotnet:3.1::el7 |
before 0:3.1.16-1.el7_9 | 0:3.1.16-1.el7_9 |
rh-dotnet31-dotnet-hostfxr-3.1Red Hat:rhel_dotnet:3.1::el7 |
before 0:3.1.16-1.el7_9 | 0:3.1.16-1.el7_9 |
rh-dotnet31-dotnet-runtime-3.1Red Hat:rhel_dotnet:3.1::el7 |
before 0:3.1.16-1.el7_9 | 0:3.1.16-1.el7_9 |
Show 50 moreShow less
| Package | Affected | Fixed |
|---|---|---|
rh-dotnet31-dotnet-sdk-3.1Red Hat:rhel_dotnet:3.1::el7 |
before 0:3.1.116-1.el7_9 | 0:3.1.116-1.el7_9 |
rh-dotnet31-dotnet-targeting-pack-3.1Red Hat:rhel_dotnet:3.1::el7 |
before 0:3.1.16-1.el7_9 | 0:3.1.16-1.el7_9 |
rh-dotnet31-dotnet-templates-3.1Red Hat:rhel_dotnet:3.1::el7 |
before 0:3.1.116-1.el7_9 | 0:3.1.116-1.el7_9 |
rh-dotnet31-netstandard-targeting-pack-2.1Red Hat:rhel_dotnet:3.1::el7 |
before 0:3.1.116-1.el7_9 | 0:3.1.116-1.el7_9 |
rh-dotnet50-aspnetcore-runtime-5.0Red Hat:rhel_dotnet:5.0::el7 |
before 0:5.0.7-1.el7_9 | 0:5.0.7-1.el7_9 |
rh-dotnet50-aspnetcore-targeting-pack-5.0Red Hat:rhel_dotnet:5.0::el7 |
before 0:5.0.7-1.el7_9 | 0:5.0.7-1.el7_9 |
rh-dotnet50-dotnetRed Hat:rhel_dotnet:5.0::el7 |
before 0:5.0.204-1.el7_9 | 0:5.0.204-1.el7_9 |
rh-dotnet50-dotnet-apphost-pack-5.0Red Hat:rhel_dotnet:5.0::el7 |
before 0:5.0.7-1.el7_9 | 0:5.0.7-1.el7_9 |
rh-dotnet50-dotnet-debuginfoRed Hat:rhel_dotnet:5.0::el7 |
before 0:5.0.204-1.el7_9 | 0:5.0.204-1.el7_9 |
rh-dotnet50-dotnet-hostRed Hat:rhel_dotnet:5.0::el7 |
before 0:5.0.7-1.el7_9 | 0:5.0.7-1.el7_9 |
rh-dotnet50-dotnet-hostfxr-5.0Red Hat:rhel_dotnet:5.0::el7 |
before 0:5.0.7-1.el7_9 | 0:5.0.7-1.el7_9 |
rh-dotnet50-dotnet-runtime-5.0Red Hat:rhel_dotnet:5.0::el7 |
before 0:5.0.7-1.el7_9 | 0:5.0.7-1.el7_9 |
rh-dotnet50-dotnet-sdk-5.0Red Hat:rhel_dotnet:5.0::el7 |
before 0:5.0.204-1.el7_9 | 0:5.0.204-1.el7_9 |
rh-dotnet50-dotnet-targeting-pack-5.0Red Hat:rhel_dotnet:5.0::el7 |
before 0:5.0.7-1.el7_9 | 0:5.0.7-1.el7_9 |
rh-dotnet50-dotnet-templates-5.0Red Hat:rhel_dotnet:5.0::el7 |
before 0:5.0.204-1.el7_9 | 0:5.0.204-1.el7_9 |
rh-dotnet50-netstandard-targeting-pack-2.1Red Hat:rhel_dotnet:5.0::el7 |
before 0:5.0.204-1.el7_9 | 0:5.0.204-1.el7_9 |
aspnetcore-runtime-3.1Red Hat:enterprise_linux:8::appstream |
before 0:3.1.16-1.el8_4 | 0:3.1.16-1.el8_4 |
aspnetcore-targeting-pack-3.1Red Hat:enterprise_linux:8::appstream |
before 0:3.1.16-1.el8_4 | 0:3.1.16-1.el8_4 |
dotnet-apphost-pack-3.1Red Hat:enterprise_linux:8::appstream |
before 0:3.1.16-1.el8_4 | 0:3.1.16-1.el8_4 |
dotnet-apphost-pack-3.1-debuginfoRed Hat:enterprise_linux:8::appstream |
before 0:3.1.16-1.el8_4 | 0:3.1.16-1.el8_4 |
dotnet-hostfxr-3.1Red Hat:enterprise_linux:8::appstream |
before 0:3.1.16-1.el8_4 | 0:3.1.16-1.el8_4 |
dotnet-hostfxr-3.1-debuginfoRed Hat:enterprise_linux:8::appstream |
before 0:3.1.16-1.el8_4 | 0:3.1.16-1.el8_4 |
dotnet-runtime-3.1Red Hat:enterprise_linux:8::appstream |
before 0:3.1.16-1.el8_4 | 0:3.1.16-1.el8_4 |
dotnet-runtime-3.1-debuginfoRed Hat:enterprise_linux:8::appstream |
before 0:3.1.16-1.el8_4 | 0:3.1.16-1.el8_4 |
dotnet-sdk-3.1Red Hat:enterprise_linux:8::appstream |
before 0:3.1.116-1.el8_4 | 0:3.1.116-1.el8_4 |
dotnet-sdk-3.1-debuginfoRed Hat:enterprise_linux:8::appstream |
before 0:3.1.116-1.el8_4 | 0:3.1.116-1.el8_4 |
dotnet-targeting-pack-3.1Red Hat:enterprise_linux:8::appstream |
before 0:3.1.16-1.el8_4 | 0:3.1.16-1.el8_4 |
dotnet-templates-3.1Red Hat:enterprise_linux:8::appstream |
before 0:3.1.116-1.el8_4 | 0:3.1.116-1.el8_4 |
dotnet3.1Red Hat:enterprise_linux:8::appstream |
before 0:3.1.116-1.el8_4 | 0:3.1.116-1.el8_4 |
dotnet3.1-debuginfoRed Hat:enterprise_linux:8::appstream |
before 0:3.1.116-1.el8_4 | 0:3.1.116-1.el8_4 |
dotnet3.1-debugsourceRed Hat:enterprise_linux:8::appstream |
before 0:3.1.116-1.el8_4 | 0:3.1.116-1.el8_4 |
aspnetcore-runtime-5.0Red Hat:enterprise_linux:8::appstream |
before 0:5.0.7-1.el8_4 | 0:5.0.7-1.el8_4 |
aspnetcore-targeting-pack-5.0Red Hat:enterprise_linux:8::appstream |
before 0:5.0.7-1.el8_4 | 0:5.0.7-1.el8_4 |
dotnetRed Hat:enterprise_linux:8::appstream |
before 0:5.0.204-1.el8_4 | 0:5.0.204-1.el8_4 |
dotnet-apphost-pack-5.0Red Hat:enterprise_linux:8::appstream |
before 0:5.0.7-1.el8_4 | 0:5.0.7-1.el8_4 |
dotnet-apphost-pack-5.0-debuginfoRed Hat:enterprise_linux:8::appstream |
before 0:5.0.7-1.el8_4 | 0:5.0.7-1.el8_4 |
dotnet-hostRed Hat:enterprise_linux:8::appstream |
before 0:5.0.7-1.el8_4 | 0:5.0.7-1.el8_4 |
dotnet-host-debuginfoRed Hat:enterprise_linux:8::appstream |
before 0:5.0.7-1.el8_4 | 0:5.0.7-1.el8_4 |
dotnet-hostfxr-5.0Red Hat:enterprise_linux:8::appstream |
before 0:5.0.7-1.el8_4 | 0:5.0.7-1.el8_4 |
dotnet-hostfxr-5.0-debuginfoRed Hat:enterprise_linux:8::appstream |
before 0:5.0.7-1.el8_4 | 0:5.0.7-1.el8_4 |
dotnet-runtime-5.0Red Hat:enterprise_linux:8::appstream |
before 0:5.0.7-1.el8_4 | 0:5.0.7-1.el8_4 |
dotnet-runtime-5.0-debuginfoRed Hat:enterprise_linux:8::appstream |
before 0:5.0.7-1.el8_4 | 0:5.0.7-1.el8_4 |
dotnet-sdk-5.0Red Hat:enterprise_linux:8::appstream |
before 0:5.0.204-1.el8_4 | 0:5.0.204-1.el8_4 |
dotnet-sdk-5.0-debuginfoRed Hat:enterprise_linux:8::appstream |
before 0:5.0.204-1.el8_4 | 0:5.0.204-1.el8_4 |
dotnet-targeting-pack-5.0Red Hat:enterprise_linux:8::appstream |
before 0:5.0.7-1.el8_4 | 0:5.0.7-1.el8_4 |
dotnet-templates-5.0Red Hat:enterprise_linux:8::appstream |
before 0:5.0.204-1.el8_4 | 0:5.0.204-1.el8_4 |
dotnet5.0Red Hat:enterprise_linux:8::appstream |
before 0:5.0.204-1.el8_4 | 0:5.0.204-1.el8_4 |
dotnet5.0-debuginfoRed Hat:enterprise_linux:8::appstream |
before 0:5.0.204-1.el8_4 | 0:5.0.204-1.el8_4 |
dotnet5.0-debugsourceRed Hat:enterprise_linux:8::appstream |
before 0:5.0.204-1.el8_4 | 0:5.0.204-1.el8_4 |
netstandard-targeting-pack-2.1Red Hat:enterprise_linux:8::appstream |
before 0:5.0.204-1.el8_4 | 0:5.0.204-1.el8_4 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-31957 is a medium vulnerability (CVSS 5.9) in Microsoft .net, published June 8, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 5.14%, the 92nd percentile. Fixed in dotnet 5.0.7.
References
portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2021-31957
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PMHWHRRYDHKM6BIINW5V7OCSW4SDWB4W
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4PRVVLXXQEF4SEJOBV3VRJHGX7YHY2CG
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VMAO4NG2OQ4PCXUQWMNSCMYWLIJJY6UY
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CVCDYIP4A6DDRT7G6P3ZW6PKNK2DNWJ2
github.com/dotnet/aspnetcore/security/advisories/GHSA-mcwm-2wmc-6hv4
Show 21 moreShow less
nvd.nist.gov/vuln/detail/CVE-2021-31957
lists.fedoraproject.org/archives/list/[email protected]/message/4PRVVLXXQEF4SEJOBV3VRJHGX7YHY2CG
lists.fedoraproject.org/archives/list/[email protected]/message/CVCDYIP4A6DDRT7G6P3ZW6PKNK2DNWJ2
lists.fedoraproject.org/archives/list/[email protected]/message/PMHWHRRYDHKM6BIINW5V7OCSW4SDWB4W
lists.fedoraproject.org/archives/list/[email protected]/message/VMAO4NG2OQ4PCXUQWMNSCMYWLIJJY6UY
github.com/advisories/GHSA-mcwm-2wmc-6hv4
github.com/dotnet/aspnetcore
access.redhat.com/errata/RHSA-2021:2350
access.redhat.com/security/updates/classification
bugzilla.redhat.com/show_bug.cgi?id=1966990
security.access.redhat.com/data/csaf/v2/advisories/2021/rhsa-2021_2350.json
access.redhat.com/security/cve/CVE-2021-31957
cve.org/CVERecord?id=CVE-2021-31957
github.com/dotnet/announcements/issues/189
msrc.microsoft.com/update-guide/vulnerability/CVE-2021-31957
access.redhat.com/errata/RHSA-2021:2351
security.access.redhat.com/data/csaf/v2/advisories/2021/rhsa-2021_2351.json
access.redhat.com/errata/RHSA-2021:2352
security.access.redhat.com/data/csaf/v2/advisories/2021/rhsa-2021_2352.json
access.redhat.com/errata/RHSA-2021:2353
security.access.redhat.com/data/csaf/v2/advisories/2021/rhsa-2021_2353.json