Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXE3Y2ctNDNtZy1xcDY5

ASP.NET Core Information Disclosure Vulnerability

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

An information disclosure vulnerability exists in .NET 5.0, .NET Core 3.1 and .NET Core 2.1 where a JWT token is logged if it cannot be parsed.

Patches

Updating .NET Core 2.1 on .NET Framework

If you are running .NET Core 2.1 on .NET Framework you need to check your projects for dependencies and update them accordingly.

Direct dependencies

Direct dependencies are discoverable by examining your csproj file. They can be fixed by editing the project file or using NuGet to update the dependency.

Transitive dependencies

Transitive dependencies occur when you add a package to your project that in turn relies on another package. For example, if Contoso publishes a package Contoso.Utility which, in turn, depends on Contoso.Internals and you add the Contoso.Utility package to your project now your project has a direct dependency on Contoso.Utility and, because Contoso.Utility depends 'Contoso.Internals', your application gains a transitive dependency on the Contoso.Internals package.

Transitive dependencies are reviewable in two ways:

The project.assets.json files are the authoritative list of all packages used by your project, containing both direct and transitive dependencies.

There are two ways to view transitive dependencies. You can either use Visual Studio’s Solution Explorer, or you can review the project.assets.json file).

Using Visual Studio Solution Explorer

To use Solution Explorer, open the project in Visual Studio, and then press Ctrl+; to activate the search in Solution Explorer. Search for the vulnerable package and make a note of the version numbers of any results you find.

For example, search for Microsoft.AspNetCore.Authentication.JwtBearer and update the package to the latest version

Manually reviewing project.assets.json

Open the project.assets.json file from your project’s obj directory in your editor. We suggest you use an editor that understands JSON and allows you to collapse and expand nodes to review this file.
Visual Studio and Visual Studio Code provide JSON friendly editing.

Search the project.assets.json file for the vulnerable package, using the format packagename/ for each of the package names from the preceding table. If you find the assembly name in your search:

For example, a search result that shows Microsoft.AspNetCore.Authentication.JwtBearer/2.1.0 is a reference to version 2.1.1 of Microsoft.AspNetCore.Authentication.JwtBearer.

If your project.assets.json file includes references to the vulnerable package, then you need to fix the transitive dependencies.

If you have not found any reference to any vulnerable packages, this means either

Other Details

Permalink: https://github.com/advisories/GHSA-q7cg-43mg-qp69
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXE3Y2ctNDNtZy1xcDY5
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: over 2 years ago
Updated: over 1 year ago


CVSS Score: 5.5
CVSS vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Identifiers: GHSA-q7cg-43mg-qp69, CVE-2021-34532
References: Repository: https://github.com/dotnet/aspnetcore
Blast Radius: 1.0

Affected Packages

nuget:Microsoft.AspNetCore.Authentication.JwtBearer
Dependent packages: 0
Dependent repositories: 0
Downloads: 510,506,212 total
Affected Version Ranges: >= 2.1.0, < 2.1.29, >= 5.0.0, < 5.0.9, >= 3.0.0, < 3.1.18
Fixed in: 2.1.29, 5.0.9, 3.1.18
All affected versions: 2.1.0, 2.1.1, 2.1.2, 3.0.0, 3.0.2, 3.0.3, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.14, 3.1.15, 3.1.16, 3.1.17, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.0.6, 5.0.7, 5.0.8
All unaffected versions: 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 2.0.0, 2.0.1, 2.0.3, 2.0.4, 2.1.30, 2.2.0, 3.1.18, 3.1.19, 3.1.20, 3.1.21, 3.1.22, 3.1.23, 3.1.24, 3.1.25, 3.1.26, 3.1.27, 3.1.28, 3.1.29, 3.1.30, 3.1.31, 3.1.32, 5.0.9, 5.0.10, 5.0.11, 5.0.12, 5.0.13, 5.0.14, 5.0.15, 5.0.16, 5.0.17, 6.0.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.0.9, 6.0.10, 6.0.11, 6.0.12, 6.0.13, 6.0.14, 6.0.15, 6.0.16, 6.0.18, 6.0.19, 6.0.20, 6.0.21, 6.0.22, 6.0.23, 6.0.24, 6.0.25, 6.0.26, 6.0.27, 6.0.28, 6.0.29, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.0.5, 7.0.7, 7.0.8, 7.0.9, 7.0.10, 7.0.11, 7.0.12, 7.0.13, 7.0.14, 7.0.15, 7.0.16, 7.0.17, 7.0.18, 8.0.0, 8.0.1, 8.0.2, 8.0.3, 8.0.4