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.
The original announcement for this issue can be found at https://github.com/aspnet/Announcements/issues/352
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.
You are affected if BOTH criteria below are met.
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>
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.
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.
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.
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.
V1.0 (Apr 9 2019): Advisory published.
_Version 1.0_
_Last Updated 2019-04-09_
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").
@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.
@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! :)
App service updates in a few weeks? 馃槙
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
It does not apply if you are using kestrel directly.
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.
Hi @blowdart ,
Could you please specify the Nuget packages that are vulnerable under this CVE?
Thanks !
There aren't any. ANCM does not ship as a nuget package.
There aren't any. ANCM does not ship as a nuget package.
@NicoleG25, @blowdart: Thanks a lot for the answer!
Most helpful comment
@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! :)