Skip to content
Heist/ feed
Back to feed
Medium

Duende.AccessTokenManagement race condition when concurrently retrieving customized Client Credentials Access Tokens

Type: advisorySources: OSV

Duende.AccessTokenManagement is a set of .NET libraries that manage OAuth and OpenId Connect access tokens. Duende.AccessTokenManagement contains a race condition when requesting access tokens using the client credentials flow. Concurrent requests to obtain an access token using differing protocol parameters can return access tokens obtained with the wrong scope, resource indicator, or other protocol parameters. Such usage is somewhat atypical, and only a small percentage of users are likely to be affected. Duende.AccessTokenManagement can request access tokens using the client credentials flow in several ways. In basic usage, the client credentials flow is configured once and the parameters do not vary. In more advanced situations, requests with varying protocol parameters may be made by calling specific overloads of these methods: `HttpContext.GetClientAccessTokenAsync()` and `IClientCredentialsTokenManagementService.GetAccessTokenAsync()`. There are overloads of both of these methods that accept a `TokenRequestParameters` object that customizes token request parameters. However, concurrent requests with varying `TokenRequestParameters` will result in the same token for all concurrent calls. Most users can simply update the NuGet package to the latest version. Customizations of the `IClientCredentialsTokenCache` that derive from the default implementation (`DistributedClientCredentialsTokenCache`) will require a small code change, as its constructor was changed to add a dep

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-26620
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 13:48 UTC · Revision 1

Source evidence

Duende.AccessTokenManagement race condition when concurrently retrieving customized Client Credentials Access Tokens

core-osv · Original source

Published 18 Feb 2025, 17:36 UTC

Duende.AccessTokenManagement is a set of .NET libraries that manage OAuth and OpenId Connect access tokens. Duende.AccessTokenManagement contains a race condition when requesting access tokens using the client credentials flow. Concurrent requests to obtain an access token using differing protocol parameters can return access tokens obtained with the wrong scope, resource indicator, or other protocol parameters. Such usage is somewhat atypical, and only a small percentage of users are likely to be affected. Duende.AccessTokenManagement can request access tokens using the client credentials flow in several ways. In basic usage, the client credentials flow is configured once and the parameters do not vary. In more advanced situations, requests with varying protocol parameters may be made by calling specific overloads of these methods: `HttpContext.GetClientAccessTokenAsync()` and `IClientCredentialsTokenManagementService.GetAccessTokenAsync()`. There are overloads of both of these methods that accept a `TokenRequestParameters` object that customizes token request parameters. However, concurrent requests with varying `TokenRequestParameters` will result in the same token for all concurrent calls. Most users can simply update the NuGet package to the latest version. Customizations of the `IClientCredentialsTokenCache` that derive from the default implementation (`DistributedClientCredentialsTokenCache`) will require a small code change, as its constructor was changed to add a dep

osv:CVE-2025-26620
Complete source record
{
  "id": "aa6bae5e67ce953fc689e8fb360a21acf830113cb896c86064b6a7e856ecaa54",
  "url": "https://osv.dev/vulnerability/CVE-2025-26620",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Duende.AccessTokenManagement race condition when concurrently retrieving customized Client Credentials Access Tokens",
    "summary": "Duende.AccessTokenManagement is a set of .NET libraries that manage OAuth and OpenId Connect access tokens. Duende.AccessTokenManagement contains a race condition when requesting access tokens using the client credentials flow. Concurrent requests to obtain an access token using differing protocol parameters can return access tokens obtained with the wrong scope, resource indicator, or other protocol parameters. Such usage is somewhat atypical, and only a small percentage of users are likely to be affected. Duende.AccessTokenManagement can request access tokens using the client credentials flow in several ways. In basic usage, the client credentials flow is configured once and the parameters do not vary. In more advanced situations, requests with varying protocol parameters may be made by calling specific overloads of these methods: `HttpContext.GetClientAccessTokenAsync()` and `IClientCredentialsTokenManagementService.GetAccessTokenAsync()`. There are overloads of both of these methods that accept a `TokenRequestParameters` object that customizes token request parameters. However, concurrent requests with varying `TokenRequestParameters` will result in the same token for all concurrent calls. Most users can simply update the NuGet package to the latest version. Customizations of the `IClientCredentialsTokenCache` that derive from the default implementation (`DistributedClientCredentialsTokenCache`) will require a small code change, as its constructor was changed to add a dep",
    "evidence": "osv:CVE-2025-26620",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-26620",
      "aliases": [
        "CVE-2025-26620",
        "GHSA-qxj7-2x7w-3mpp"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/duendesoftware/foss",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "368f47d47cbe4ada94a82fe1e2bbdc97eb7c747b"
                },
                {
                  "fixed": "a33332ddec0ebf3c048ba85427e3c77d47c68dac"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.2.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "a33332ddec0ebf3c048ba85427e3c77d47c68dac"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "atm-3.1.1",
            "atm-3.1.0",
            "atm-3.1.0-preview.1",
            "im-7.0.0-preview.2",
            "im-7.0.0",
            "it-0.0.1-preview.1",
            "im-7.0.0-preview.1",
            "atm-3.0.0",
            "3.0.0",
            "3.0.0-preview.3",
            "3.0.0-preview.2",
            "3.0.0-preview.1",
            "2.1.0-preview.1",
            "2.1.0",
            "2.0.3",
            "2.0.2",
            "2.0.1",
            "2.0.0",
            "2.0.0-preview.1.3",
            "2.0.0-preview.1.2",
            "2.0.0-preview.1.1",
            "2.0.0-preview.1",
            "1.1.0",
            "1.0.0",
            "1.0.0-preview.5",
            "1.0.0-preview.4",
            "1.0.0-preview.3",
            "1.0.0-preview.2",
            "1.0.0-preview.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-26620.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:35.955654439Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/26xxx/CVE-2025-26620.json",
        "https://github.com/DuendeSoftware/foss/security/advisories/GHSA-qxj7-2x7w-3mpp",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-26620",
        "https://github.com/DuendeSoftware/foss/commit/a33332ddec0ebf3c048ba85427e3c77d47c68dac"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-367"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/26xxx/CVE-2025-26620.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-26620",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 503298,
  "published_at": "2025-02-18T17:36:15.764+00:00"
}