CVE-2026-18218: Keycloak TokenManager revocation bypass via client not-before policy

CVE-2026-18218 · Severity: medium · CVSS 4.2 · Published 2026-07-31

Keycloak is an identity management service used to manage user logins and security tokens for applications. A flaw in its token management component prevents administrators from successfully revoking security tokens for specific applications if a broader security policy was previously set for the entire system. This means that even after an administrator attempts to invalidate a user's access, that user may still be able to refresh their session and access sensitive information.

Technologies: Red Hat build of Keycloak. Vendors: Red Hat.

Quick answers

Is CVE-2026-18218 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-18218 being exploited in the wild.
How severe is CVE-2026-18218?
Medium severity, with a CVSS score of 4.2, published 31 July 2026.
Which products and versions are affected?
Red Hat build of Keycloak unspecified.
Is there a fix for CVE-2026-18218?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-18218 attacked?
It is attacked over the network, in a hosted service.
Am I affected by CVE-2026-18218?
Check whether you run Red Hat build of Keycloak at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A logic error exists in the TokenManager.NotBeforeCheck component of Keycloak. When an administrator sets a 'not-before' revocation policy for a specific client, the system may silently ignore it if the security realm already has an older, non-zero 'not-before' policy in place. This occurs because the logic incorrectly prioritizes the older realm-level timestamp over the newer client-level one. An authenticated attacker with OIDC tokens issued between the two timestamps can continue to refresh sessions, use the introspection endpoint, and access the UserInfo endpoint, effectively bypassing the intended revocation.

Affected products

  • Red Hat Red Hat Build of Keycloak unspecified

Timeline

  • 2026-07-29: other: Reported to Red Hat Bugzilla
  • 2026-07-31: advisory: NVD and Red Hat published advisory details

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.