Uploaded image for project: 'Red Hat build of Keycloak'
  1. Red Hat build of Keycloak
  2. RHBK-3427

Unbounded login_hint Parameter Can Corrupt KC_RESTART Cookie and Break Login Flow

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      The optional login_hint parameter in the OIDC login URL is accepted without any size validation. When supplied with a long value, it is:

      • Reflected into the email/username field on the login form
      • Stored in the authentication session 
      • Serialized into the KC_RESTART cookie

      If the resulting cookie exceeds the ~4096-byte browser limit, it is dropped or truncated by the browser. This breaks the login flow, resulting in:

      • Blank 0-byte responses
      • Intermittent redirect loops
      • In some cases, HTTP 502 errors

      This leads to unstable authentication behavior and increased backend load. The issue reflects uncontrolled input handling in a core login path, affecting reliability and availability.

      See https://github.com/keycloak/keycloak/issues/40857 for the details.

              mposolda@redhat.com Marek Posolda
              mposolda@redhat.com Marek Posolda
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: