GHSA-5CWC-6HFP-2MR7
The Users administration datatable is gated on the items page right, so any user can list the accounts managed by the roles they hold
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-5CWC-6HFP-2MR7 divulgada · CVSS 4.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The datatable behind the Users administration page (`app/sources/users.datatable.php`) was gated on the `items` page right, which every authenticated user holds, instead of the `users` right the page itself requires. For a caller who is neither an administrator nor an HR manager, its only scoping is "accounts administrated by a role the caller holds". A plain or read-only user who holds a team role R therefore received the directory of every account managed by R: login, real name, roles, privilege level, last sign-in time, last source IP, MFA, lock and passkey state. The sibling log datatable had the same defect, fixed by GHSA-qhff-v9qj-75wc.
Details
Paths and line numbers as of 3.2.4.1 (identical in 3.2.4.0).
- `public/sources/users.datatable.php:10` loads `app/sources/users.datatable.php`.
- Gate (`users.datatable.php:76`): `userAccessPage('items')`.
- In `PerformChecks::userAccessPage()`, `items` is in the `user` page list (`app/vendor/teampassclasses/performchecks/src/PerformChecks.php:201`). It is therefore granted to any live, non-deleted account.
- `users` is only in the manager, HR and administrator lists (`:205`, `:210`, `:219`).
- The Users page and its script both require `users` (`app/pages/users.php:69`, `app/pages/users.js.php:72`). The datatable is called only from that page (`users.js.php:175`).
- Scope (`:171-184` in SQL, `:243-250` in the display loop):
- It compares `u.isAdministratedByRole` with `user-roles_array`, which holds the roles the caller holds, manual and AD (`app/sources/identify.php:1605`).
- Neither layer checks that the caller is a manager. Every user-administration action does check it (`app/sources/users.queries.php:140-158`, `callerMayManageUser()`).
- Sink (`:253-419`): for each account in scope, the response returns:
- user id, login, first name and last name;
- managing role, held roles (manual and AD), privilege level (administrator, HR, manager, read-only or user), `can_create_root_folder`, `personal_folder`;
- authentication type (local, LDAP or OAuth2), and the pending account action (for example a key generation or a forced password change);
- creation date, last connection time and last source IP (`:294`; IPv4 addresses are shown, link-local IPv6 ones are not);
- "MFA disabled" flag (when Duo or Google Authenticator is enabled), brute-force lock and its expiry, disabled state;
- number of sign-in passkeys and passwordless state, inactivity-policy warning and action dates, ongoing background task;
- total number of accounts in scope.
No password, e-mail address, TOTP secret or key is returned.
5. E-mail recovery through sorting. The sortable column list (`:111`, `:126-140`) includes `u.email` (index 11) and `u.ga` (index 12), which are never returned.
- Any user can set their own e-mail address at once, with no confirmation, through `user_profile_update` (`users.queries.php:110`, `:2628`, `:2680`). This is allowed unless `disable_user_edit_profile` is set.
- The caller's own row is normally in scope. By changing their own address and watching where their row lands with `order[0][column]=11`, they can work out the e-mail address of each account in scope, one character at a time.
Realistic configuration. In delegated management, the role R that a team holds is also the team's "managed by" role. A manager can create accounts only with roles they may grant (`users.queries.php:858`). OAuth2 self-registration can set both values to the same role (`identify.php:2350-2394`). The default "managed by", administrators only (`0`), exposes nobody.
Affected versions.
- 3.0.10 and later: the gate is `items`.
- 3.0.0.0 to 3.0.9: the gate was `checkUser(..., 'folders')`, and `folders` was also in the user-level page list, with the same `isAdministratedByRole` scope.
Proof of concept
- Use an account with `admin=0`, `gestionnaire=0` and `can_manage_all_users=0` (read-only accounts work too). It holds role R, and other accounts are managed by R.
- With that account's own session cookie, send:
- `aaData` lists every account managed by R with the fields above.
- Optional: alternate `user_profile_update` (`email`) with `order[0][column]=11&order[0][dir]=asc` to recover the e-mail addresses.
Impact
Any authenticated user who holds a role that other accounts are managed by can read the directory of those accounts without the manager standing the Users page requires. The newly exposed data is the security posture of colleagues:
- who is privileged;
- who has no MFA;
- which accounts are locked or disabled;
- last sign-in times and source IPs;
- e-mail addresses, through the sorting oracle.
This is reconnaissance for targeted phishing and credential attacks against the password manager's users. No secret, password or item is exposed (C:L). Accounts managed by administrators only are not exposed.
Patches
Fixed in 3.2.4.2:
- The datatable is gated on the `users` page right, like the page that calls it and like `users.logs.datatable.php`. Only administrators, managers and HR managers pass, and their flags are re-read from the database on every request.
- Only the 9 displayed columns can be sorted. The e-mail and TOTP secret columns are no longer reachable through `ORDER BY`.
Workarounds
Make sure the role that manages an account ("managed by") is not held by plain users. For example, use a dedicated "Managers of team X" role held by the managers only, or set "managed by" to administrators only. To stop the e-mail sorting, enable `disable_user_edit_profile` (Settings): it also stops users from editing their own profile.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
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.2 | — | — |
3.2.4.2Arsenal 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-5cwc-6hfp-2mr7Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
