CVE-2024-51987
JSON

5.4medium

HTTP Client uses incorrect token after refresh in Duende.AccessTokenManagement.OpenIdConnect

Severity
5.4medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.24% (higher than 16% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-7mr7-4f54-vcx5

Description

Duende.AccessTokenManagement.OpenIdConnect is a set of .NET libraries that manage OAuth and OpenId Connect access tokens. HTTP Clients created by `AddUserAccessTokenHttpClient` may use a different user's access token after a token refresh occurs. This occurs because a refreshed token will be captured in pooled `HttpClient` instances, which may be used by a different user. Instead of using `AddUserAccessTokenHttpClient` to create an `HttpClient` that automatically adds a managed token to outgoing requests, you can use the `HttpConext.GetUserAccessTokenAsync` extension method or the `IUserTokenManagementService.GetAccessTokenAsync` method. This issue is fixed in Duende.AccessTokenManagement.OpenIdConnect 3.0.1. All users are advised to upgrade. There are no known workarounds for this vulnerability.

Affected

Product or packageVersionsReported by
DuendeSoftware Duende.AccessTokenManagement= 3.0.0CVE List
Duende.AccessTokenManagement.OpenIdConnect (NuGet)from 3.0.0 before 3.0.1GitHub Advisory Database

All scores

GitHub_M5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
GitHub5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Classification

CWE-270

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Duende.AccessTokenManagement.OpenIdConnect is a set of .NET libraries that manage OAuth and OpenId Connect access tokens. HTTP Clients created by `AddUserAccessTokenHttpClient` may use a different user's access token after a token refresh occurs. This occurs because a refreshed token will be captured in pooled `HttpClient` instances, which may be used by a different user. Instead of using `AddUserAccessTokenHttpClient` to create an `HttpClient` that automatically adds a managed token to outgoing requests, you can use the `HttpConext.GetUserAccessTokenAsync` extension method or the `IUserTokenManagementService.GetAccessTokenAsync` method. This issue is fixed in Duende.AccessTokenManagement.OpenIdConnect 3.0.1. All users are advised to upgrade. There are no known workarounds for this vulnerability.

GitHub Advisory Database
Impact

HTTP Clients created by AddUserAccessTokenHttpClient may use a different user's access token after a token refresh. This occurs because a refreshed token will be captured in pooled HttpClient instances, which may be used by a different user.

Workarounds

Instead of using AddUserAccessTokenHttpClient to create an HttpClient that automatically adds a managed token to outgoing requests, you can use the HttpConext.GetUserAccessTokenAsync extension method or the IUserTokenManagementService.GetAccessTokenAsync method.

Patches

This issue is fixed in Duende.AccessTokenManagement.OpenIdConnect 3.0.1.

NVD (es)

Duende.AccessTokenManagement.OpenIdConnect es un conjunto de librerías .NET que administran tokens de acceso de OAuth y OpenId Connect. Los clientes HTTP creados por `AddUserAccessTokenHttpClient` pueden usar el token de acceso de un usuario diferente después de que se actualice el token. Esto ocurre porque un token actualizado se capturará en instancias `HttpClient` agrupadas, que pueden ser utilizadas por un usuario diferente. En lugar de usar `AddUserAccessTokenHttpClient` para crear un `HttpClient` que agregue automáticamente un token administrado a las solicitudes salientes, puede usar el método de extensión `HttpConext.GetUserAccessTokenAsync` o el método `IUserTokenManagementService.GetAccessTokenAsync`. Este problema se solucionó en Duende.AccessTokenManagement.OpenIdConnect 3.0.1. Se recomienda a todos los usuarios que actualicen. No se conocen workarounds para esta vulnerabilidad.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-51987 changed 2024-11-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-7mr7-4f54-vcx5 changed 2024-11-08CC-BY-4.0
NVDCVE-2024-51987 changed 2026-06-17Public domain