GHSA-H66M-8W9Q-86R2
Role-based item restrictions are bypassed by the item details request and the exports
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-H66M-8W9Q-86R2 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`). Two web paths ignored the role part:
- the second item-details request returned the item's TOTP seed to folder members lacking the required role;
- the CSV, XML (KeePass), PDF and offline HTML exports exported role-restricted items, current password included, to folder members lacking the role.
A third defect of the same feature, item creation writing its role restriction onto a client-supplied item id, is covered by GHSA-jgmv-3gr2-fjpw.
Details
Paths under `app/sources/`, line numbers as of 3.2.4.0.
1. `showDetailsStep2` (`items.queries.php:4039-4063`). The handler computed the restriction itself. Line 4048 cleared it whenever `restricted_to` was empty, and the role loop could only clear it further, so an item restricted to roles only was never protected. Folder members without the role received `otp_secret`, the decrypted TOTP seed (4160-4169), plus the attachment list and passkey metadata. The first details request (`show_details_item`) and `getItemRestrictedUsersList()` handle this case correctly. From 3.1.3.1 to 3.1.x, the computed restriction was not applied at all in this request, so every folder member received the seed of any item, whatever its restriction.
2. Exports (`export.queries.php`: XML 284-297, CSV 431-435, PDF 672-673, HTML 1018-1031). Each export checked `restricted_to` only and never read `restriction_to_roles`. A role-restricted item was exported with its password, decrypted with the caller's own sharekey (shared items are keyed for every user), and, in the CSV export, its TOTP seed (since 3.2.2.6). The export handler also did not check the export permission (`allow_print` and `roles_allowed_to_print_select`) that the Export page applies.
Preconditions
- The `restricted_to_roles` option is enabled (Settings > Options) for path 1, and for path 2 to matter.
- The attacker is authenticated and can open the item's folder.
Impact
A folder member deliberately excluded from an item through a role restriction reads its TOTP seed (a lasting compromise of its second factor) and, through an export, its current password.
Patches
Fixed in 3.2.4.1:
- `showDetailsStep2` uses `getItemRestrictedUsersList()`, the same decision as the item card.
- The four exports apply the canonical user and role predicate (`itemRestrictionAllows()`), and the export handler enforces the export permission of the Export page, administrators excluded.
Workarounds
- Disable exports (Settings > Options: `allow_print`).
- Prefer user-based restrictions, or a dedicated folder, for the most sensitive items.
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-h66m-8w9q-86r2Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
