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

    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 ID SNYK-DOTNET-DUENDEACCESSTOKENMANAGEMENTOPENIDCONNECT-8353098
  • published 8 Nov 2024
  • disclosed 7 Nov 2024
  • credit Nate Laff

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
Expand this section

Snyk

Recommended
5.3 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Attack Requirements (AT)
    None
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    Passive
  • Confidentiality (VC)
    Low
  • Integrity (VI)
    Low
  • Availability (VA)
    None
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None