Privilege Context Switching Error Affecting duende.accesstokenmanagement.openidconnect package, versions [3.0.0,3.0.1)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (11th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DOTNET-DUENDEACCESSTOKENMANAGEMENTOPENIDCONNECT-8353098
  • published8 Nov 2024
  • disclosed7 Nov 2024
  • creditNate Laff

Introduced: 7 Nov 2024

CVE-2024-51987  (opens in a new tab)
CWE-270  (opens in a new tab)

How to fix?

Upgrade Duende.AccessTokenManagement.OpenIdConnect to version 3.0.1 or higher.

Overview

Duende.AccessTokenManagement.OpenIdConnect is a .NET library that manages OpenId Connect access tokens in ASP.NET Core applications.

Affected versions of this package are vulnerable to Privilege Context Switching Error due to the improper handling of token refresh in pooled HttpClient instances. An attacker can gain unauthorized access to another user's access token by exploiting the reuse of HttpClient instances across different users.

Workaround

This vulnerability can be mitigated by using the HttpConext.GetUserAccessTokenAsync extension method or the IUserTokenManagementService.GetAccessTokenAsync method instead of AddUserAccessTokenHttpClient.

CVSS Scores

version 4.0
version 3.1