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 package | Versions | Reported by |
|---|---|---|
| DuendeSoftware Duende.AccessTokenManagement | = 3.0.0 | CVE List |
| Duende.AccessTokenManagement.OpenIdConnect (NuGet) | from 3.0.0 before 3.0.1 | GitHub Advisory Database |
All scores
| GitHub_M | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
| GitHub | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
| GitHub | medium CVSS:4.0 | CVSS: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
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-51987 changed 2024-11-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-7mr7-4f54-vcx5 changed 2024-11-08 | CC-BY-4.0 |
| NVD | CVE-2024-51987 changed 2026-06-17 | Public domain |