The JWT signing key cache in TokenKeyResolver uses kid as the sole cache key without namespacing by authority. In applications with multiple JwtBearer schemes pointing to different identity providers, a key fetched for one scheme can satisfy token validation for another. Additionally, cached keys have no expiration, so rotated or revoked keys remain trusted until the application process restarts.
In multi-scheme deployments, an attacker who controls one identity provider's signing key can forge tokens accepted by other schemes within the same application. For all applications using TokenKeyResolver, a signing key removed from the identity provider's JWKS endpoint remains trusted indefinitely.
If an immediate upgrade is not possible:
JwtBearer scheme per application when different identity providers are required.{
"github_reviewed": true,
"cwe_ids": [
"CWE-668"
],
"severity": "MODERATE",
"github_reviewed_at": "2026-07-02T20:31:47Z",
"nvd_published_at": "2026-06-17T23:17:04Z"
}