dotnet / dotnet/announcements

Microsoft Security Advisory CVE-2018-8416: .NET Core Tampering Vulnerability

Open
#95 0 comments 0 reactions 0 assignees View on GitHub
Security
Dominant language
No language data
Stars
1.4k
Forks
53
PR merge metrics
No merged PRs in 30d

Description

# Microsoft Security Advisory CVE-2018-8416: .NET Core Tampering Vulnerability

## Executive summary

Microsoft is releasing this security advisory to provide information about a vulnerability in .NET Core 2.1. This advisory also provides guidance on what developers can do to update their applications to remove this vulnerability.

Microsoft is aware of a tampering vulnerability exists when .NET Core improperly handles specially crafted files. An attacker who successfully exploited this vulnerability could write arbitrary files and directories to certain locations on a vulnerable system. However, an attacker would have limited control over the destination of the files and directories.

To exploit the vulnerability, an attacker must send a specially crafted file to a vulnerable system

The update addresses the vulnerability by correcting how .NET Core handles these files.

## Discussion

Discussion for this issue can be found at https://github.com/dotnet/corefx/issues/34427

### Mitigation factors

If your application does not extract ZIP compressed files it is unaffected.

## Affected software

Any .NET Core based application that uses the [System.IO.Compression.ZipFile](https://www.nuget.org/packages/System.IO.Compression.ZipFile/) package with a vulnerable version listed below.

Package name | Vulnerable versions | Secure versions
------------ | ------------------- | -------------------------
Microsoft.NETCore.App (System.IO.Compression.ZipFile) | 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6 | 2.1.7

## Advisory FAQ

### How do I know if I am affected?

`System.IO.Compression.ZipFile` is distributed as part of the .NET Core 2.1 runtime. To check the currently installed runtimes, open a command prompt and run the `dotnet --info` command. If you have a 2.1 or greater runtime installed, you'll see output like the following;

```text
.NET Core SDK (reflecting any global.json):
Version: 2.2.100
Commit: b9f2fa0ca8

Runtime Environment:
OS Name: Windows
OS Version: 10.0.17134
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.2.100\

Host (useful for support):
Version: 2.2.0
Commit: 1249f08fed

.NET Core SDKs installed:
2.1.5 [C:\Program Files\dotnet\sdk]
2.1.502 [C:\Program Files\dotnet\sdk]
2.2.100 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

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

If your host version is 2.1.x and the highest `Microsoft.NETCore.App` runtime version is less than 2.1.7, you're vulnerable to this issue.
If your host version is 2.2.x and the highest 2.1.x `Microsoft.NETCore.App` runtime version is less than 2.1.7, you're vulnerable to this issue.

You will not see SDK versions if you have only installed the runtime.

### How do I fix the issue?

If your host version is a 2.1.x host you must install version 2.1.7 or later of the [.NET Core 2.1 runtime](https://dotnet.microsoft.com/download/dotnet-core/2.1), or corresponding [.NET Core 2.1 SDK](https://dotnet.microsoft.com/download/dotnet-core/2.1).

If your host version is a 2.2.x you must install version 2.2.1 or later of the [.NET Core 2.2 runtime](https://dotnet.microsoft.com/download/dotnet-core/2.2), or corresponding [.NET Core 2.2 SDK](https://dotnet.microsoft.com/download/dotnet-core/2.2).

Finally, you must restart your applications once an updated runtime or SDK is installed.

## 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](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.

### Acknowledgments

[Danny Grander](https://twitter.com/grander) of [Snyk](https://snyk.io/)

### External Links

[CVE-2018-8416](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-8416)

### Revisions

V1.1 (January 9, 2019): Correct affected pacakge table.
V1.0 (January 8, 2019): Advisory published.

_Version 1.1_

_Last Updated 2019-01-09_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.