Conversation
## Context Okta sign-in resolves the integration from the email domain and fetches the user identity from the integration's admin-configurable host. An admin of any Okta-enabled organization could point that host at a server they control and, because login just-in-time provisioned a membership for the returned email, receive a session for an unrelated existing user (cross-organization account takeover). Entra ID is unaffected as it fetches identity from a fixed Microsoft endpoint. ## Description Reject the sign-in when the resolved email belongs to an existing user who is not an active member of the integration's organization. Brand-new users are still provisioned on the fly, and existing members keep signing in, so enabling Okta on an existing organization is unaffected. Adding an existing user to another organization must now go through an invite.
## Context Okta does not guarantee the casing of the email it returns from the userinfo endpoint, so a user whose Okta email differs only in case from the address they typed was wrongly rejected with okta_userinfo_error. Entra ID already compares case-insensitively. ## Description Match the userinfo email against the expected address with a case-insensitive comparison, aligning the Okta flow with Entra ID.
## Context The Okta integration host is admin-configurable and interpolated directly into the authorize, token and userinfo URLs (https://<host>/oauth2/v1/...). Without validation an admin could set a value such as "victim.okta.com@evil.com" or an internal address, sending the OAuth requests somewhere other than the intended Okta host (URL injection / SSRF). This mirrors the format validation Entra ID already enforces. ## Description Reject a configured host that is not a bare URL host segment (alphanumerics, dots and hyphens). Only the explicitly configured host is validated; when none is set the derived <organization_name>.okta.com default is used and left untouched, so custom Okta domains such as login.acme.com remain valid. This is defense-in-depth, not the primary fix for the cross-organization takeover.
endenis
reviewed
Aug 13, 2026
## Context The SSO login-method authorization checked whether the user belonged to any organization with the method enabled, rather than the organization that configured the integration being used. A user who belonged to one organization with the method enabled could therefore sign in through a different organization's integration even when that organization had the method disabled. This affected both Okta and Entra ID. ## Description Scope the check to the integration's organization: require the user to be an active member of that organization and that organization to have the login method enabled. Raised while reviewing the Okta cross-organization fix and applied to Entra ID for parity.
endenis
reviewed
Aug 17, 2026
ancorcruz
force-pushed
the
fix/okta-sso-host-account-takeover
branch
from
August 19, 2026 11:08
bf51ecf to
b33ad0b
Compare
## Context Auth::Okta::AcceptInviteService fetches the user identity from the integration's admin-configurable host, then accepts the invite through Invites::AcceptService, which mints a session for the invited email. An admin could create an invite for an unrelated existing user's email in their own organization and, using a host they control, accept it to receive a session as that user - the same cross-organization takeover already fixed in the login flow. Entra ID is unaffected because it fetches identity from a fixed Microsoft endpoint. ## Description Reject the Okta invite acceptance when the invited email belongs to an existing user who is not already an active member of the invite's organization, before contacting the host or minting a session. Brand-new users are still onboarded through the invite; adding an existing user to another organization must go through an authenticated flow.
ancorcruz
force-pushed
the
fix/okta-sso-host-account-takeover
branch
from
August 19, 2026 11:51
b33ad0b to
76177cd
Compare
endenis
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of INT-203
Context
Okta sign-in resolves the integration from the email domain, then exchanges the authorization code and fetches user identity from the host configured on that integration. The host is admin-configurable, and sign-in just-in-time (JIT) provisioned a membership for whatever email the host returned. An admin of any Okta-enabled organization could therefore point the host at a server they control and receive a session for an unrelated, existing user — a cross-organization account takeover.
Entra ID is unaffected: it fetches identity from a fixed Microsoft Graph endpoint rather than an admin-supplied host.
Changes
<organization_name>.okta.comdefault and custom Okta domains such aslogin.acme.comremain valid.If merged before #6146, existing users invited to Okta enabled organizations won't be able to accept the invite and join the organization. I'd still merge it as this fixes a security issue.