Bookmarks

    Nothing saved yet. Use the bookmark on any article. Bookmarks are kept on this device only: they stay private and work without an account.

    Settings

    Appearance

    Reading mode

    Font size

    Content width

    Line spacing

    Keyboard shortcuts

    /
    Search
    j k
    Next / previous story
    ← →
    Previous / next section (columns)
    b
    Bookmarks
    s
    Settings
    r
    Columns / scroll
    t
    Light / dark

    Saved in this browser only.

    Ping2Prompt
    Subscribe to the Weekly Brief Sign in
    A combination padlock lying open on a white computer keyboard, with a wooden surface behind it.
    Photo by Sasun Bughdaryan on Unsplash

    Keycloak-orgs v0.199 fixes account takeover through org identity providers

    Automated source check

    Keycloak

    Org identity providers could take over out-of-domain accounts

    An identity provider (IdP) attached to an organization in keycloak-orgs, Phase Two's Keycloak organizations extension, can create accounts for email addresses outside the org's domains. It can then take those accounts over. The advisory, GHSA-gvcc-4vw2-6wvr, describes the impact as account takeover and lists no CVE id.

    How the email check is bypassed after first login

    The extension's verifier, ext-auth-org-id-verifier, only runs after the broker login. By then first broker login has already created the user and stored the federated identity link. The verifier needs an existing user, so it cannot run earlier. Nothing checks the brokered email against the org's domains before the user is created.

    In the attack, the IdP creates a user for a victim's email. The verifier rejects that login, but the user and the federated link stay in place. The real owner cannot register because the email is taken.

    They use Forgot Password and set a password, and they cannot see the attacker's federated link. The IdP then logs in again with the same sub and an in-domain email. FORCE sync rewrites the stored email before the verifier runs, so the verifier passes and the attacker gets a session on the victim's user.

    A variant needs no IdP admin. Any org member can edit the email field on the Review Profile page during their own first broker login.

    keycloak-orgs 0.160 confirmed affected, current main likely too

    The reporters reproduced the attack end to end on phasetwo-keycloak:26.6.2, which ships keycloak-orgs 0.160. They believe current main, v0.197, is also affected, based on reading the code. The full affected range is not stated, so check which keycloak-orgs version your realm runs. The exploitation status is unknown (the sources do not say). Treat the update as pending work, not as optional.

    Update keycloak-orgs to v0.199 or later

    keycloak-orgs v0.199, tagged on 2026-11-16, contains merge commit ecdd26e of PR #527, the fix for this advisory. Update to it. The fix adds a first-broker-login authenticator, ext-auth-org-domain-fbl-verifier.

    It checks the brokered email domain against the organizations that own the IdP before idp-create-user-if-unique runs. The new gate is set to REQUIRED right after idp-review-profile, so email edits on the Review Profile page are checked too.

    It does nothing for IdPs that do not belong to an org. The post-broker verifier now shares the domain-match logic, so both enforce the same rules.

    The gate is added automatically to new realms and retrofitted onto existing realms after migration. If you set KC_ORGS_SKIP_MIGRATION, existing realms do not get the retrofit. Switching the sync mode to IMPORT does not help, because the verifier checks the brokered email, not the stored one. The reporters wrote their own first-broker-login authenticator as a stopgap and offered to share it.

    Product Affected Fixed
    keycloak-orgs (Phase Two) 0.160 confirmed; v0.197 suspected; full range not stated v0.199

    Sources

    Image: Photo by Sasun Bughdaryan on Unsplash


    This story was produced with AI assistance from the sources listed above and fact-checked against them before publication. Read our editorial methodology and the corrections log. Spotted an error? Email [email protected].

    Continue

    Share on Bluesky · Mastodon · Email ·

    Discussion