Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft Security Advisory CVE-2019-0815: ASP.NET Core denial of service vulnerability #9205

Closed
shirhatti opened this issue Apr 9, 2019 · 11 comments
Labels
Milestone

Comments

@shirhatti
Copy link
Contributor

shirhatti commented Apr 9, 2019

Microsoft Security Advisory CVE-2019-0815: ASP.NET Core denial of service vulnerability

Executive Summary

Microsoft is releasing this security advisory to provide information about a vulnerability in public ASP.NET Core 2.2. This advisory also provides guidance on what developers can do to update their applications correctly.
Microsoft is aware of a security vulnerability in all public versions of ASP.NET Core where, if an application is hosted on Internet Information Server (IIS) a remote unauthenticated attacker can use a specially crafted request can cause a Denial of Service. The security update addresses the vulnerability by ensuring the IIS worker process does not crash in response to specially crafted requests.

Announcement

The original announcement for this issue can be found at aspnet/Announcements#352

Affected Software

The vulnerability affects any Microsoft ASP.NET Core 2.2 applications if it is hosted on an IIS server running AspNetCoreModuleV2 (ANCM) prior to and including version 12.2.19024.2.

The vulnerability affects any Microsoft ASP.NET Core 1.0/1.1/2/1 application if they have explicitly opted into using the newer AspNetCoreModuleV2 (ANCM) prior to and including version 12.2.19024.2.

Advisory FAQ

How do I know if I am affected?

You are affected if BOTH criteria below are met.

  1. The AspNetCoreModuleV2 module is used by your application

The modules attribute in the handler mapping section of the web.config of your application must exactly match the string AspNetCoreModuleV2.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\myapp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
    </system.webServer>
  </location>
</configuration>
  1. The version of AspNetCoreModuleV2 module installed on your machine is less than or equal to 12.2.19024.2

Open a PowerShell prompt and run the following command

(Get-Item "$env:ProgramFiles\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll").VersionInfo

or use the Windows file properties dialog to check the version on C:\Program Files\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll, where C: is your OS install drive.

How do I fix the issue?

Install the latest version of the ASP.NET Core Runtime & Hosting Bundle 2.2.

Then restart IIS by running

net stop was /y
net start w3svc

from an elevated command line.

Other Information

Reporting Security Issues

If you have found a potential security issue in .NET Core, please email details to secure@microsoft.com. 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 where you can ask questions.

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-0815

Revisions

V1.0 (Apr 9 2019): Advisory published.

Version 1.0
Last Updated 2019-04-09

@eriksendc
Copy link

Maybe I'm completely dense... upon getting the email and reading the above, I went here:

https://dotnet.microsoft.com/download/dotnet-core/2.2

In the first row of the table I selected the Runtime & Hosting Bundle link, the first link in the third column of the table.

After dotnet-hosting-2.2.3-win.exe downloaded I ran it.

After running

(Get-Item "$env:ProgramFiles\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll").VersionInfo

I get

ProductVersion   FileVersion      FileName
--------------   -----------      --------
12.2.19024.2     12.2.19024.2     C:\Program Files\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll

So I'm not understanding the instructions I guess? The instructions stated "Install the latest version of the ASP.NET Core Runtime & Hosting Bundle 2.2." but I'm getting 12.2.19024.2, which is supposedly the bad version ("up to and including 12.2.19024.2").

@shirhatti
Copy link
Contributor Author

@eriksendc I believe you may visited https://dotnet.microsoft.com/download/dotnet-core/2.2 before 2.2.4 was made available for download. Please try again by installing the 2.2.4 hosting bundle.

@eriksendc
Copy link

@shirhatti Yes that's what happened. Do note that I went there because of the email being sent... maybe next time check the timing and make sure your assets are deployed before making the announcement. It could have been a caching issue... you need to take the timing of your ttl on the cache into account when computing the timing of your announcements. Just food for thought for next time. Thanks for the update! :)

@Plasma
Copy link

Plasma commented Apr 10, 2019

App service updates in a few weeks? 😕

@gaborposz
Copy link

Hello,
I would have a question regarding this vulnerability:
According to the text it applies "if an application is hosted on Internet Information Server (IIS)"

But does it also apply if I use Kestrel Self Hosting with the Microsoft.AspNetCore.Server.Kestrel 2.2.0 NuGet package?

Thank you for the answer in advance!

Regards,
Gabor

@blowdart
Copy link
Contributor

It does not apply if you are using kestrel directly.

@martincostello
Copy link
Member

Once this is "patched enough", would you be able to share some details as to what specific scenario caused this crash to manifest in applications?

We stumbled across it in December after deploying 2.2.0 (see #4789), so I'd be interested to map the scenario back to our application and why were so affected.

@NicoleG25
Copy link

Hi @blowdart ,
Could you please specify the Nuget packages that are vulnerable under this CVE?
Thanks !

@blowdart
Copy link
Contributor

blowdart commented Mar 1, 2020

There aren't any. ANCM does not ship as a nuget package.

@gaborposz
Copy link

There aren't any. ANCM does not ship as a nuget package.

@NicoleG25, @blowdart: Thanks a lot for the answer!

@ghost
Copy link

ghost commented Dec 2, 2020

Thank you for contacting us. Due to a lack of activity on this discussion issue we're closing it in an effort to keep our backlog clean. If you believe there is a concern related to the ASP.NET Core framework, which hasn't been addressed yet, please file a new issue.

This issue will be locked after 30 more days of inactivity. If you still wish to discuss this subject after then, please create a new issue!

@ghost ghost closed this as completed Dec 2, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 1, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants