ToolJet's SSO Flaw Is an Identity-Binding Failure
CVE-2026-137536 is easy to describe as an email-validation bug, but that label misses the design failure. The ToolJet server matched OAuth users by email and issued sessions for the matched local account without binding that account to the provider subject. An email check can fail in many ways. The durable problem is that ToolJet never had a reliable link between the external identity and the local user.
The identity object that was missing
OAuth providers expose an immutable subject identifier alongside attributes such as name and email. The subject is the stable account handle. Email can change, be reassigned, or be presented with different verification states.
ToolJet parsed the subject but did not persist and use a (provider, subject) pair as the account lookup key. Instead, the server took the email returned by Google or Git and searched for a user with that address. A matching email therefore acted as an implicit account link, even when the SSO provider had never been linked to the account.
Why an email comparison is not a binding
An application can test whether an email string is formatted correctly and still make a dangerous identity decision. That test says nothing about who controls the provider account, whether the address was verified, or whether the same local account was previously associated with that provider subject.
The missing binding has consequences for account lifecycle events. A user may change an email address at the identity provider. An administrator may reassign an address within an organization. An invited user may have an account before completing an SSO-based activation. Each event makes email a weak anchor for a security decision.
The safer model is explicit linking. On first successful SSO sign-in, ToolJet should record the provider and subject against the local user after a verified, deliberate association. Later sign-ins should look up that pair first and treat email as a display attribute. If the email matches an existing user but no subject binding exists, the flow should stop and request an authenticated linking action rather than silently authenticating.
How the bypass follows from that design
The GitHub advisory describes a public callback that accepted a provider response and proceeded to the email lookup. A request from an unauthenticated caller was not the barrier; possession of a suitable provider assertion was.
The attacker needed a trusted-issuer token carrying the victim's email. On Google, the token also needed the configured ToolJet client ID as its audience. The server verified the signature and audience, then ignored the absence of a verified-email signal in the vulnerable path. The lookup returned the victim's local user, and the session generator created that user's session.
The control failures around the lookup
Three separate controls could have reduced the risk.
The first is a verified-email gate. A provider response should not be allowed to link an identity unless the provider establishes that the address belongs to that identity. The patched Google parser now returns emailVerified, and the server rejects an explicit false value. The Git parser also propagates the selected address's verification state.
The second is a subject binding. Email verification answers whether the address was verified. It does not answer whether this provider subject is the account that previously controlled the local user. ToolJet's advisory recommends storing and resolving (provider, sub) as the primary link.
The third is collision handling. When a verified email matches an existing local account but the subject has no prior binding, an automatic session is unsafe. The link should require an authenticated action, such as signing in with the existing method before attaching the new provider.
What the patched source shows
The tagged v3.21.94-beta source contains an email-verification rejection in the OAuth service. It also stops Google sign-in when the SSO configuration has no client ID, preventing the token library from skipping an audience check. The Google helper now emits the provider's email_verified value, and the Git helper tracks whether the selected primary address is verified.
These changes close the reported path, but administrators should read them as hardening rather than a full replacement for durable subject linking. A verified email collision can still represent a legitimate account migration. The application needs a product decision about how a user proves ownership of the existing account before attaching a new provider identity.
Affected deployments
The issue affects ToolJet versions before 3.21.94-beta. The vendor advisory names 3.21.96-LTS as the patched stable release, while the CVE record marks 3.21.94-beta as fixed. Teams should verify the actual build they run rather than infer status from a release family.
Deployments without Google or Git SSO enabled do not expose this specific sign-in path. Deployments with SSO enabled, an unrestricted domain policy, and local or invited accounts that share an email with an external provider identity carry the relevant risk.
Exposure context
ZoomEye returned 689 product matches for app="ToolJet" during the earlier exposure check for this topic. The CVE filter returned zero. The larger number identifies the product fingerprint, not confirmed vulnerable instances, so it should guide inventory review without being treated as proof of compromise.
A durable remediation checklist
Upgrade to a fixed build and verify the effective SSO settings. Enumerate local and invited users whose addresses could be asserted by Google or Git. Review recent sign-ins for sessions created through SSO when the account had no prior provider link.
Longer term, require subject-based lookup, preserve verified-email evidence, and make account linking an explicit authenticated workflow. Log the provider, subject, email, verification result, local user, and decision outcome together so that an identity decision can be reconstructed during an investigation.
Top comments (0)