GHSA-6QG7-W2P8-7RW4
send_email share_this_item emails restricted-item label/path/link to any attacker-chosen address
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-6QG7-W2P8-7RW4 divulgada · CVSS 4.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The `send_email` action of `app/sources/items.queries.php` ignored the per-item restrictions. Its `share_this_item` branch checked only that the caller could open the item's folder, so a folder member excluded from an item, by user or by role, could email that item's label, folder path and direct link to any address. A second branch, `request_access_to_author`, had no access check at all: any signed-in account that is not read-only could have the label and folder path of any item emailed to any user, itself included.
Details
Paths and line numbers are those of 3.2.4.4.
- `send_email` (`:7156`) checks the session key and the account-wide read-only flag, then dispatches on the posted `cat`.
- `share_this_item` (`:7229`) is gated by `accessToItemIsGranted()` (`app/sources/main.functions.php:5736`). That function checks that the item's folder is in the caller's accessible folders, and nothing else: it never reads `restricted_to` or `restriction_to_roles`. The paths that release item data (item view, password read, history, exports) resolve the caller's rights with `getCurrentAccessRights()`, which applies both restrictions.
- `request_access_to_author` (`:7195`) reads an item id and a user id from the `content` POST field, which it parses whenever a `name` field is posted, and emails that user the item's label and readable folder path. It checks neither the item nor the user. No page of 3.2.4.4 sends this request.
- Item ids are sequential and the recipient can be the caller's own address, so a caller can list the labels of the items they are excluded from by stepping through ids. Through `request_access_to_author`, that extends to every item of the instance, other users' personal folders included.
The per-item restriction has never been checked on these paths. The folder check of `share_this_item` was added in 3.2.0.0; before that, the branch had no check either.
Proof of concept
Fixture: folder `Shared` (id 1) shared with role `TeamA`; users `owner` and `attacker`, both in `TeamA`; item 2 `SECRET-ROLE-XYZ` restricted to role `Finance`, with *restricted to roles* enabled.
- Control: as `attacker`, `show_details_item` on item 2 returns `show_details: 0` and `get_item_password` returns an empty password. The restriction holds.
- As `attacker`, post `type=send_email` to `sources/items.queries.php` with `{"id": 2, "receipt": "victim@example.local", "cat": "share_this_item"}`. The answer is `{'error': False, 'message': ''}`.
- The queued `send_email` task, addressed to `victim@example.local`, reads: "attacker has shared with you the password item SECRET-ROLE-XYZ (Shared). Click this link to access the item."
Impact
The label, folder path and link of an item leave the instance, by email, to an address the caller chooses. That item is one the caller was excluded from, or, through `request_access_to_author`, any item of the instance. The recipient cannot open the item through the link. No password and no other encrypted field is part of either email.
Sending a shared item to any address is intended, since sharing by email is meant to reach people outside TeamPass. The defect is which items could be shared.
Patches
Fixed in 3.2.4.5:
- `share_this_item` refuses a deleted or missing item and requires read access to it through `getCurrentAccessRights()`. That covers folder scope, personal folders and the user and role restrictions;
- `request_access_to_author` is removed, together with its *Access request to an item* email template, and `send_email` refuses any category other than `share_this_item`.
Workarounds
None short of upgrading.
Credits
Reported by Aditay Kumar (`adityasunny06help-coder`). The maintainer found the `request_access_to_author` branch while checking the fix.
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.5 | — | — |
3.2.4.5Arsenal 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-6qg7-w2p8-7rw4Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
