REDHAT-BUG-2487006: High severity Keycloak Keycloak vulnerability

Published Jun 9, 2026
·
Updated

A JWT algorithm confusion vulnerability was found in Keycloak's JWT Authorization Grant flow . A flaw in the signature verification logic allows an attacker with valid client credentials to submit a forged assertion using alg=HS256 with the Identity Provider's public key bytes as the HMAC secret, bypassing asymmetric signature verification. This enables the attacker to mint access tokens and impersonate any federated user linked to the affected IdP. The vulnerability requires an IdP configured with jwtAuthorizationGrantEnabled=true, a hardcoded public key (useJwksUrl=false), and no pinned assertion signature algorithm (the default).

Affected Software

1 affected component
Keycloak Keycloak

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Disable the JWT Authorization Grant flow by setting jwtAuthorizationGrantEnabled=false on the IdP to prevent the JWT Authorization Grant flow from being used for this algorithm confusion attack.

    Keycloak (JWT Authorization Grant flow / Identity Provider configuration) jwtAuthorizationGrantEnabled = false
  2. Configuration

    Avoid the vulnerable configuration that uses a hardcoded public key by setting useJwksUrl=true instead of useJwksUrl=false (the latter corresponds to the described vulnerable setup).

    Keycloak (Identity Provider configuration) useJwksUrl = true
  3. Configuration

    Configure assertion verification to require a pinned assertion signature algorithm (the default leaves it unpinned, which is required for exploitation per the description).

    Keycloak (JWT Authorization Grant flow / assertion verification) pinned assertion signature algorithm = set to a specific asymmetric algorithm

Event History

Jun 9, 2026
Data Sourced
via Red Hat·02:09 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-2487006?

The severity of REDHAT-BUG-2487006 is high, rated at 7.

2

What type of vulnerability is REDHAT-BUG-2487006?

REDHAT-BUG-2487006 is a JWT algorithm confusion vulnerability found in Keycloak's JWT Authorization Grant flow.

3

How can I mitigate REDHAT-BUG-2487006?

Mitigation for REDHAT-BUG-2487006 involves ensuring proper validation of JWT signatures and avoiding the use of insecure algorithm configurations.

4

What are the potential impacts of REDHAT-BUG-2487006?

The potential impacts of REDHAT-BUG-2487006 include unauthorized access to resources through forged JWT assertions.

5

Which software is affected by REDHAT-BUG-2487006?

REDHAT-BUG-2487006 affects Keycloak software specifically within its JWT Authorization Grant flow.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203