GHSA-GRV6-M9PJ-4CF2
OAuth2 "Allowed groups for self-registration" is not enforced: every user of the identity provider can self-register
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-GRV6-M9PJ-4CF2 divulgada · CVSS 5.4 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The *Allowed groups for self-registration* setting of the OAuth page was never enforced. As soon as it held any value, every user authenticated by the identity provider received a TeamPass account at their first SSO sign-in, whatever their groups, with the roles matched from their group names or the default self-registration role.
Details
Paths and line numbers are those of 3.2.4.2.
- `checkOauth2User()` (`app/sources/identify.php:3680`) only tests whether `oauth_self_register_groups` is empty. An empty value refuses the sign-in of a user without account. Any other value calls `createOauth2User()` for that user.
- `createOauth2User()` (`:3873`) compares the `displayName` of each of the user's groups with the whole setting string, and only to leave that group out of the role matching. With `GroupA,GroupB`, no group ever matches. The user's groups are never compared with the list.
- `externalAdCreateUser()` (`:2366`) gives the new account the roles whose titles equal its group names, or, when none matches, the role set in *Self-registered user belongs to role* (`:2414-2418`).
The tip of the setting described it as the *"Comma separated list of groups that are allowed to self-register"*.
Impact
An administrator who restricted self-registration to some groups at the identity provider in fact allowed every user who can authenticate to the TeamPass application at the provider. Such a user gets an active TeamPass account and the items of the roles it receives: the roles named after its own groups, or the default self-registration role. Users who already have an account are not affected.
The exposure depends on the provider side. When the TeamPass application is restricted at the provider to the intended users (Entra ID *Assignment required*, an authentik or Keycloak access policy), the setting adds nothing and nothing more is exposed. When every user of the directory may sign in to the application, which is the default of an Entra ID enterprise application, every one of them can create an account.
Patches
Fixed in 3.2.4.3. The list is decoded, split on commas and matched, ignoring case, against the name or the Entra object id of each group the provider sent. A user outside the list is refused with an explicit message, and the failed authentications of the Logs page show the groups received. `*` lets every user in, and an empty field still disables self-registration. The groups are read from the provider answer the server kept in the session, never from the login form. With Entra ID, the groups come from `transitiveMemberOf`, so nested groups count. The listed groups stay out of the role matching.
Workarounds
- Restrict the TeamPass application at the identity provider to the users allowed to self-register: with Entra ID, enable *Assignment required* on the enterprise application and assign the groups.
- Or empty *Allowed groups for self-registration*, and create the accounts beforehand (Users → OAuth2 synchronization).
To find the accounts created this way, list the OAuth2 accounts created since self-registration was enabled and compare them with the members of the allowed groups.
After upgrading, if you relied on any value letting everybody self-register, enter `*`.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistnilsteampassnet/teampass |
Corregida | 3.2.4.3 | — | — |
3.2.4.3Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/nilsteampassnet/TeamPass/security/advisories/GHSA-grv6-m9pj-4cf2Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
