GHSA-75QW-H7P8-PPR3
Item history and item TOTP code ignore the per-item restriction: a folder member excluded from an item reads its previous passwords and its current one-time code
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-75QW-H7P8-PPR3 divulgada · CVSS 6.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
TeamPass items can be restricted to some users (`items.restricted_to`) and/or some roles (`restriction_to_roles`). A folder member who matches neither must not read the item's content. Two web handlers, `load_item_history` (password history) and `show_opt_code` (item TOTP), checked only that the item's folder was visible to the caller. They decrypt their data with the instance key, so no per-user sharekey is needed, and they returned it to users excluded by the restriction.
Details
Paths under `app/sources/`, line numbers as of 3.2.4.0.
Both handlers were gated by `accessToItemIsGranted()` (`main.functions.php:5665-5683`). It only checks that the item's folder is in the session's `user-accessible_folders` list. It never reads the item restriction, and it lets administrators through on every shared folder, although TeamPass otherwise never shows shared item content to an administrator. Every other read path, including the password itself (`get_item_password`), the item card and the REST API, goes through `getCurrentAccessRights()` or the same restriction predicate.
- `load_item_history` (`items.queries.php:7904-8110`): after the folder check (line 7915), each `at_pw` log row is decrypted with the instance key (8000-8016) and returned as `previous_passwords` (8102-8108). The history also carries the previous values of the item's custom fields, encrypted fields included, and the previous login, label, URL and e-mail. Before 3.2.0.0 this handler did not check folder access either.
- `show_opt_code` (`items.queries.php:4505-4594`): after the folder check (line 4529), the TOTP secret is decrypted with the instance key (4549) and the current code is returned (4586). It was returned even when OTP is disabled on the item.
Proof of concept
User U can open folder F (a read-only folder is enough for the history). Item I in F is restricted so that U is excluded; I is still listed in F with its id. As U:
- `POST sources/items.queries.php` with `type=load_item_history`, `item_id=<I>`, `key=<U's session key>`: the decoded response holds I's previous passwords in clear text.
- `POST sources/items.queries.php` with `type=show_opt_code`, `id=<I>`, `key=<U's session key>`: the decoded response holds I's current one-time code.
An administrator gets the same results for any shared item.
Impact
A user deliberately excluded from an item, or an administrator, reads its previous passwords, the previous values of its custom fields and its current one-time code. The current password stays protected. The attacker must be authenticated and, except for an administrator, able to open the item's folder.
Patches
Fixed in 3.2.4.1: both handlers now require the same read access as the item's password (`getCurrentAccessRights()`), which applies the user and role restriction and refuses administrators. `show_opt_code` no longer serves a disabled OTP.
Workarounds
None short of upgrading. Moving a sensitive item to a folder that only its intended users can open removes the exposure, because the folder check is enforced.
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.1 | — | — |
3.2.4.1Arsenal 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-75qw-h7p8-ppr3Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
