CVE-2024-51987 HTTP Client uses incorrect token after refresh in Duende.AccessTokenManagement.OpenIdConnect

Medium 5.4 Published Updated

HTTP clients may use another user's access token after refresh, allowing unauthorized data access or account takeover.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-51987?

CVE-2024-51987 is a medium-severity vulnerability in DuendeSoftware Duende.AccessTokenManagement, published on 7 Nov 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-270

Which versions are affected by CVE-2024-51987?

2 open source packages ship an affected version, including Duende.AccessTokenManagement.OpenIdConnect.

PackageAffectedFixed in
Duende.AccessTokenManagement.OpenIdConnect NuGetFrom 3.0.03.0.1
Duende.AccessTokenManagement.OpenIdConnect NuGetFrom 3.0.03.0.1

How do I fix CVE-2024-51987?

Upgrade Duende.AccessTokenManagement.OpenIdConnect to 3.0.1 or later.

Is CVE-2024-51987 being exploited?

There is no known exploitation of CVE-2024-51987 in the wild and no public exploit code.

Sources

Also known as GHSA-7mr7-4f54-vcx5.

Is CVE-2024-51987 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free