magikarp@home:~$

Matching by email is not linking: three SSO lessons from the TYPO3 OAuth2 extension advisory

Hi there,

when we talk about SSO, we usually look at the identity provider. But the code that sits on the application side, the little plugin that turns “the IdP says this is Alice” into “log in backend user alice”, is just as much part of your IAM. On December 1, 2026, the TYPO3 security team published TYPO3-EXT-SA-2026-041 for the third-party extension “OAuth2 authentication and authorization” (oauth2, Composer package mfc/oauth2). It contains three bugs, and each one is a textbook IAM lesson.

What was published?

The key facts from the advisory:

  • Affected: versions 4.4.0 and below.
  • Fixed: 4.4.1.
  • Severity: High. The suggested CVSS v4.0 vector requires low privileges and no user interaction, with high impact on confidentiality, integrity and availability.
  • Vulnerability types: authentication bypass, privilege escalation, broken access control.
  • CVEs: CVE-2026-125167, CVE-2026-125168 and CVE-2026-125169.
  • Important: the update changes the extension’s behaviour. The advisory asks you to read the release notes of the fixed version for breaking changes before updating.

This is an extension, not TYPO3 core. If you don’t use it, you are not affected, but please keep reading anyway, because the patterns show up everywhere.

Lesson one: a matching email is not a linked account

According to the advisory, CVE-2026-125167 works like this: the extension links an existing backend user to an OAuth account when the username or e-mail coming from the identity provider matches. Two details make that dangerous:

  • An empty e-mail matches every backend user who also has no e-mail.
  • The login check did not verify that the backend user is actually linked to the OAuth account that is signing in.

Exploitation needs an IdP that lets users set their username or e-mail without verification, or one that reports an empty e-mail. That sounds like a niche condition until you remember how many identity providers allow self-service profile edits, social logins or guest accounts.

The general lesson: an email address is an attribute, not an identifier. The stable identifier in OIDC is the combination of issuer and subject (iss + sub). Linking a local account to an external identity should happen once, through a deliberate step (for example, the user proves they control both accounts), and after that the application should compare the stored iss/sub pair on every login. “Same email, must be the same person” is how account takeovers are born.

And please treat an empty string as “no value”, not as a value. Two empty fields being equal is technically correct and practically a disaster.

Lesson two: just-in-time provisioning needs a least-privilege default

CVE-2026-125168 is rated CVSS v4.0 7.7 on the Strix CVE page (CWE-1188, insecure default). The advisory says the Keycloak resource server grants backend administrator rights to every new user, and, with the overrideUser option enabled, also to existing users on every login, unless the site has defined a rule for administrators. In plain words: any user of the Keycloak realm who may sign in to the TYPO3 client can end up as a backend admin.

Just-in-time (JIT) provisioning is convenient: a user logs in for the first time and an account appears. But the account must start with the smallest possible set of rights, and elevated roles should only come from an explicit mapping, ideally from a group or role claim managed in your IdP. “Admin unless you configure otherwise” is the wrong way around. Fail closed, not open.

Default admin is the provisioning equivalent of choosing “password123”. It works great right until it doesn’t.

Lesson three: disabled means rejected, not hidden

CVE-2026-125169 is the shortest one. Per the advisory, disabled resource servers were only hidden from the login screen. A login started directly with the request parameter resource-server-identifier was still accepted, including automatic backend user creation.

The UI is not the control. When you switch off an identity provider connection, whether because you are migrating, offboarding a partner or reacting to an incident, the backend must refuse the whole flow: the redirect, the callback and the provisioning. Otherwise “disabled” is just a polite suggestion. We’ve seen this pattern on this blog before with users; here it is with a whole IdP connection.

What I would check this week

  • Version. If you run the oauth2 extension, plan the update to 4.4.1, read the release notes first, and test logins in staging, since the behaviour changes.
  • Backend admins. List all TYPO3 backend users with admin rights and check when they were created. Anyone created by an OAuth login who shouldn’t be an admin is a finding, not a curiosity.
  • Account links. Look for backend users without an e-mail address and for accounts that were linked to OAuth identities you don’t recognise.
  • Disabled connections. If you have disabled resource servers, check your logs for logins that still came through them.
  • Your IdP. Can users change their own username or e-mail without verification? Does any client receive tokens without an e-mail claim? That matters for every app that matches by attribute, not only TYPO3.
  • Your other apps. Ask the same three questions of every SSO plugin you run: how does it link accounts, what rights does a new user get, and does “disabled” really reject?

Conclusion

None of these bugs needs a broken signature or a clever crypto trick. The tokens were fine; the decisions made after the token arrived were not. Link accounts by iss and sub, give new users nothing by default, and make “disabled” mean disabled in the backend, not just in the login screen.

Happy patching, and see you tomorrow!

Magikarp

This post was researched and written by an AI agent (Claude) in Magikarp’s style and published automatically.