runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Microsoft Security Advisory CVE-2019-0820: .NET Core Denial of Service Vulnerability

Open blowdart opened this issue 7 years ago • 8 comments

Microsoft Security Advisory CVE-2019-0820: .NET Core Denial of Service Vulnerability

Executive summary

Microsoft is releasing this security advisory to provide information about a vulnerability in .NET Core 1.0, 1.1, 2.1 and 2.2. 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 .NET Core improperly process RegEx strings. An attacker who successfully exploited this vulnerability could cause a denial of service against a .NET application.

A remote unauthenticated attacker could exploit this vulnerability by issuing specially crafted requests to a .NET Core application.

The update addresses the vulnerability by correcting how .NET Core applications handle RegEx string processing.

Announcement

The original announcement for this issue can be found at https://github.com/dotnet/announcements/issues/111

Mitigation factors

There are no mitigating factors for this vulnerability.

Affected software

Any .NET Core based application that uses the System.Text.RegularExpressions package with a vulnerable version listed below.

Package name Vulnerable versions Secure versions
System.Text.RegularExpressions.dll 4.3.0 4.3.1

Advisory FAQ

How do I know if I am affected?

The affected assemblies are part of .NET Core. If you are running a vulnerable version of .NET Core you may be affected.

How do I fix the issue?

To fix the issue please install the latest version of .NET Core. If you have multiple versions of .NET Core installed you will need to install multiple runtimes, or SDKs depending on what you have installed.

If you have .NET Core 2.0 or greater installed you can list the versions you have installed by running the dotnet --info command. You will see output like the following;

.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview3-010431
 Commit:    d72abce213

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.18362
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\

Host (useful for support):
  Version: 3.0.0-preview3-27503-5
  Commit:  3844df9537

.NET Core SDKs installed:
  1.1.13 [C:\Program Files\dotnet\sdk]
  2.1.602 [C:\Program Files\dotnet\sdk]
  2.2.202 [C:\Program Files\dotnet\sdk]
  3.0.100-preview3-010431 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]\
  Microsoft.AspNetCore.All 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview3-19153-02 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0-preview3-27503-5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.0.0-preview3-27504-2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

If your version of .NET Core does not support the dotnet --info command then you have either .NET Core 1.0 or .NET Core 1.1 installed.

  • For machines running .NET Core 1.0 you should download Runtime 1.0.16 or SDK 1.1.14 from https://dotnet.microsoft.com/download/dotnet-core/1.0.
  • For machines running .NET Core 1.1 you should download Runtime 1.1.13 or SDK 1.1.14 from https://dotnet.microsoft.com/download/dotnet-core/1.1.
  • For machines running .NET 2.1 you should download Runtime 2.1.11 or SDK 2.1.507 for Visual Studio 2017 or SDK 2.1.604 for Visual Studio 2019 from https:// dotnet.microsoft.com/download/dotnet-core/2.1
  • For machines running .NET 2.2 you should download Runtime 2.2.5 or SDK 2.2.107 for Visual Studio 2017 or SDK 2.2.204 for Visual Studio 2019 from https://dotnet.microsoft.com/download/dotnet-core/2.2.

Once you have installed the updated runtime or SDK you should restart your apps for the update to take effect.

If you have pinned your application to a specific version of the runtime you must update your app, recompile and redeploy it for the update to take effect.

Other Information

Reporting Security Issues

If you have found a potential security issue in .NET Core, please email details to [email protected]. Reports may qualify for the .NET Core Bug Bounty. Details of the .NET Core Bug Bounty including terms and conditions are at https://aka.ms/corebounty.

Support

You can ask questions about this issue on GitHub in the .NET Core or ASP.NET Core organizations. These are located at https://github.com/dotnet/ and https://github.com/aspnet/. The Announcements repo for each product (https://github.com/dotnet/Announcements and https://github.com/aspnet/Announcements) will contain this bulletin as an issue and will include a link to a discussion issue. You can ask questions in the discussion issue.

Disclaimer

The information provided in this advisory is provided "as is" without warranty of any kind. Microsoft disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Microsoft Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Microsoft Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.

External Links

CVE-2019-0820

Revisions

V1.0 (May 14, 2019): Advisory published.

Version 1.0

Last Updated 2019-05-14

blowdart avatar May 14 '19 17:05 blowdart

Is there a certain pattern that is being exploited here to make these vulnerabilities possible? It would seem that if they are happening in framework code, then custom code development is certainly at risk as well.

My inquiry here is aiming to ensure best patterns and practices, and ensuring we are doing our best here on the outside to mitigate these sorts of issues on our side as well.

Mike-E-angelo avatar May 14 '19 17:05 Mike-E-angelo

Any idea when the patched SDKs will be available? The links provided still list the vulnerable versions as current.

ketrex2 avatar May 14 '19 17:05 ketrex2

@Ketrex - download site should be showing the new versions now.

leecow avatar May 14 '19 18:05 leecow

@leecow Great! Thanks for the follow up!

ketrex2 avatar May 14 '19 19:05 ketrex2

@blowdart - affected software section text mentions the System.Private.Uri package, though the table details System.Text.RegularExpressions.dll. Is this correct?

ocoster-ff avatar May 15 '19 08:05 ocoster-ff

Oops, fixed, thanks

blowdart avatar May 15 '19 13:05 blowdart

Is it possible for you to point to the commit that fixed the issue?

GSPP avatar May 22 '19 12:05 GSPP

e.g. in 2.1: https://github.com/dotnet/corefx/commit/19d4b1163d8a03dd90ff5fd1785eea6305112545

stephentoub avatar Jul 22 '19 15:07 stephentoub