GHSA-28MQ-VX4V-72H8
TeamPass user_folders_rights lets a manager read any role-holding user's folder-rights map via an unscoped POST user_id
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-28MQ-VX4V-72H8 divulgada · CVSS 4.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
TeamPass authorises the `user_folders_rights` action only by caller role (manager or HR) and never checks the caller's relationship to the target. The target id is read from a plain POST field `user_id` (`app/sources/users.queries.php:2107`), which sidesteps the manager target-scope pre-check at `:166-216` because that pre-check only runs when the id arrives inside the encrypted `data` blob. So any manager or HR account can call `getUserCompleteData(null, $post_id)` (`:2115`) for an arbitrary user id and read that account's folder-rights map: folder titles, permission levels and contributing role names, plus login and first/last name. It is organisational metadata, not passwords (C:L). CWE-639. CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N (4.3).
Details
- Class: Broken access control / IDOR (CWE-639, CWE-863)
- Component: `app/sources/users.queries.php`, case `user_folders_rights` — TeamPass 3.2.4.0, commit `01bddcdae9b8469a760095de8c7541c8607f7201` (release tag `3.2.4.0`)
- CVSS: 4.3 MEDIUM — `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`
- Boundary crossed: the manager's administrative scope — any manager or HR account can read the folder-rights map of any role-holding user outside its administrative scope; admin targets that hold no roles expose only login and name.
## Source → sink trace (tainted variable per hop)
1. Source — `POST type=user_folders_rights` with plain (unencrypted) POST field `user_id`: `app/sources/users.queries.php:2107` — `$post_id = (int) filter_input(INPUT_POST, 'user_id', FILTER_SANITIZE_NUMBER_INT);`. The frontend sends this field outside the encrypted `data` blob (`app/pages/users.js.php:1544-1549`).
2. Entry gates: the case is not in `$all_users_can_access` (`:109-131`) so the caller must be admin, manager or HR (`:143-161`); in-case gates are the session key (`:2086`) and the caller read-only check (`:2095`). Nothing else.
3. The manager target-scope pre-check (`:166-216`) — which restricts managers to non-privileged users administrated by their roles — fires only when `!empty($dataReceived['user_id'])`, i.e. when the target id travels inside the encrypted blob. This case reads the id from the plain POST field, so the pre-check never evaluates: no privilege, ownership or scope check on the target is ever performed.
4. `:2115` — `$rowUser = getUserCompleteData(null, $post_id);` loads the target's roles, allowed and denied folders regardless of who the target is (admin targets included).
5. `:2132-2140` — `roles_values` join for every role the target holds.
6. Sink — `:2191-2198` and `:2214-2217`: the response enumerates every non-personal folder the target can access — `id`, `title`, `nlevel`, permission `type` (W/R/ND/NE), `special` flag and the contributing role titles — plus the target's `login`, `name`, `lastname`.
## Sanitizer absence
- `(int) filter_input(..., FILTER_SANITIZE_NUMBER_INT)` (`:2107`) is type coercion, not authorization.
- There is no `callerMayManageUser()` / `callerMayManageTargetUser()` call anywhere in the case — the two-tier guard that all sibling cases rely on is inert here because of where the id is read from.
## Reachability / preconditions
- Attacker: any manager (`gestionnaire`) or HR (`can_manage_all_users`) account — stock, non-admin roles; no knowledge of the target's password or ids beyond a numeric user id (sequential, enumerable).
- Feature default-on: the case backs the users-page folder-rights dialog; no setting gates it.
…(full source→sink trace available on request)
---
Please publish this as a GitHub Security Advisory and request a CVE (GitHub can assign one as a CNA). Please credit Artur Chlebicki (GitHub: @Artur12555) as the reporter/discoverer. I'm happy to verify a fix or provide any further detail. Thank you! Credit: @Artur12555.
Proof of concept
- Source — `POST type=user_folders_rights` with plain (unencrypted) POST field `user_id`: `app/sources/users.queries.php:2107` — `$post_id = (int) filter_input(INPUT_POST, 'user_id', FILTER_SANITIZE_NUMBER_INT);`. The frontend sends this field outside the encrypted `data` blob (`app/pages/users.js.php:1544-1549`).
- Entry gates: the case is not in `$all_users_can_access` (`:109-131`) so the caller must be admin, manager or HR (`:143-161`); in-case gates are the session key (`:2086`) and the caller read-only check (`:2095`). Nothing else.
- The manager target-scope pre-check (`:166-216`) — which restricts managers to non-privileged users administrated by their roles — fires only when `!empty($dataReceived['user_id'])`, i.e. when the target id travels inside the encrypted blob. This case reads the id from the plain POST field, so the pre-check never evaluates: no privilege, ownership or scope check on the target is ever performed.
- `:2115` — `$rowUser = getUserCompleteData(null, $post_id);` loads the target's roles, allowed and denied folders regardless of who the target is (admin targets included).
- `:2132-2140` — `roles_values` join for every role the target holds.
- Sink — `:2191-2198` and `:2214-2217`: the response enumerates every non-personal folder the target can access — `id`, `title`, `nlevel`, permission `type` (W/R/ND/NE), `special` flag and the contributing role titles — plus the target's `login`, `name`, `lastname`.
Impact
Any authenticated manager or HR account can enumerate the folder-rights map of any role-holding user by iterating `user_id` values: which folders each user reaches, at what permission level, through which roles, plus login and name. Admin accounts that hold no role assignments expose only login and name, because the folder data populates only when the target has roles. No passwords or secret contents are disclosed (C:L). The value to an attacker is reconnaissance: a low-privilege manager maps the permission topology of users outside their administrative scope to set up follow-on attacks.
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-28mq-vx4v-72h8Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
