> ## Content Index
> Fetch the complete content index at: https://ping2prompt.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Keycloak-orgs v0.199 fixes account takeover through org identity providers
- URL: https://ping2prompt.com/keycloak-orgs-v0-199-fixes-org-idp-account-takeover/
- Published: 2026-11-17T16:57:11.000Z
- Updated: 2026-11-17T16:57:37.000Z
- Description: keycloak-orgs v0.199 fixes GHSA-gvcc-4vw2-6wvr, where an organization's identity provider could create and take over accounts for emails outside the org's domains. Update to v0.199 or later; exploitation status is unknown.
- Author: Ping2Prompt Newsroom
- Tags: Keycloak, Security tools, Vulnerabilities, High, #auto, #short-ping

## 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

- [github.com/p2-inc/keycloak-orgs/security/advisories/GHSA-gvcc-4vw2-…](https://github.com/p2-inc/keycloak-orgs/security/advisories/GHSA-gvcc-4vw2-6wvr?ref=ping2prompt.com)
- [github.com/p2-inc/keycloak-orgs/releases/tag/v0.199](https://github.com/p2-inc/keycloak-orgs/releases/tag/v0.199?ref=ping2prompt.com)
- [github.com/p2-inc/keycloak-orgs/pull/527](https://github.com/p2-inc/keycloak-orgs/pull/527?ref=ping2prompt.com)

Image: [Photo by Sasun Bughdaryan on Unsplash](https://unsplash.com/photos/a-combination-lock-rests-on-a-computer-keyboard-WUJmdr8pNwk?utm%5Fsource=ping2prompt&utm%5Fmedium=referral)

---

This story was produced with AI assistance from the sources listed above and fact-checked against them before publication. Read our [editorial methodology](https://ping2prompt.com/about-how-we-work/) and the [corrections log](https://ping2prompt.com/corrections/). Spotted an error? Email [editor@ping2prompt.com](mailto:editor@ping2prompt.com).