REDHAT-BUG-2589431: Medium severity Red Hat Keycloak vulnerability
A flaw was found in Keycloaks JWT Authorization Grant (granttype=urn:ietf:params:oauth:grant-type:jwt-bearer) implementation. The token redemption path on the token endpoint fails to consult the BruteForceProtector to check for temporary account lockouts. When resolving a local user from a signed assertion, the code only verifies that the user exists, is enabled, and has no pending required actions. Since a temporary brute-force lockout does not set the enabled flag to false, a locked user successfully passes these checks. Exploitation requires that the realm has brute-force detection enabled, a JWT Authorization Grant identity provider is configured, and the attacker can present a valid assertion signed by the trusted issuer for the locked user. Successful exploitation allows an attacker to obtain valid access tokens for a user account that is currently in a brute-force-locked state, effectively bypassing the lockout policy.
Affected Software
Event History
Frequently Asked Questions
Which deployments are exposed to this bypass?
A realm is exposed only if brute-force detection is enabled and a JWT Authorization Grant identity provider is configured. The issue applies when a temporarily brute-force-locked local user can be resolved from an assertion issued by the configured trusted issuer.
What does an attacker need to exploit the issue?
The attacker must be able to present a valid JWT assertion for the locked user that is signed by the trusted issuer. A temporary lockout alone is not sufficient to exploit the issue.
What is the impact of successful exploitation?
An attacker can redeem the assertion at the token endpoint and obtain valid access tokens for an account that is currently temporarily locked by the brute-force protection policy. This bypasses the intended lockout enforcement for that grant flow.
What can be done if a fix cannot be applied immediately?
The affected path requires both brute-force detection and a JWT Authorization Grant identity provider. Restricting or disabling that grant configuration where operationally feasible removes the described exploitation path.