GHSA-9375-G3M3-9JVG
Per-item restriction bypass via notification subscription — restricted-item metadata emailed to unauthorized folder members
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-9375-G3M3-9JVG divulgada · CVSS 3.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Subscribing to an item's change notifications ignored the per-item restrictions. A member of a shared folder excluded from an item, by user or by role, could subscribe to it through `save_notification_status`. Every later edit of the item then emailed that member its current label, its folder, the name of the user who changed it, the names of the changed fields and a link to it. Notifications were also sent to every subscriber without checking their current access, so a subscription taken while a user could still read the item kept working after a restriction or a role change removed that access.
Details
Paths and line numbers are those of 3.2.4.4.
- `save_notification_status` in `app/sources/items.queries.php` (`:8311`) 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 never reads `restricted_to` or `restriction_to_roles`.
- `notifyChangesToSubscribers()` (`app/sources/main.functions.php:4124`), called by `update_item` after each edit, queues an email to every row of the `notification` table for the item. It does not check whether the subscriber may still read the item.
- The paths that release item data (item view, password read, history, exports) resolve the caller's rights with `getCurrentAccessRights()`, which applies both restrictions.
Subscriptions exist since 3.0.0.0. Before 3.2.0.0 the subscription had no check at all, so any signed-in user could subscribe to any item id, including items in folders they could not open and in other users' personal folders. 3.2.0.0 added the folder check, which still ignores the item restriction.
Proof of concept
Fixture: folder `SharedVault` shared with role `teamrole`; users `owner` and `attacker`, both in that role; item 1 created by `owner` and restricted to `owner`.
- Control: as `attacker`, `show_details_item` on item 1 returns "You are not allowed to access this item" and `get_item_password` returns an empty password. The restriction holds.
- As `attacker`, post `type=save_notification_status` to `sources/items.queries.php` with `{"notification_status": 1, "item_id": 1}`. The answer is `{"error": false}` and the `notification` table holds a row for item 1 and `attacker`.
- As `owner`, rename item 1 to `SECRET-LABEL-XYZ-EDITED`.
- An email is queued to `attacker`: "You have asked to be notified on changes performed on item SECRET-LABEL-XYZ-EDITED in folder SharedVault. User Owner Owner did at least one change.", with a link to the item. It is repeated on every edit.
Impact
A folder member excluded from an item learns, by email and on every edit, that the item exists, its current label, its folder, when it changes, who changed it and which fields changed. No field value, password included, is part of the email. Another user has to save a change to the item before anything is sent.
Patches
Fixed in 3.2.4.5:
- `save_notification_status` 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;
- `notifyChangesToSubscribers()` checks each subscriber's current read access before queuing the email. Subscriptions taken before the fix, or before a restriction or role change, stop receiving notifications. The rows are kept, so a user whose access is restored receives them again without subscribing anew.
Workarounds
None short of upgrading. After the upgrade, existing subscriptions need no clean-up.
Credits
Reported by Aditay Kumar (`adityasunny06help-coder`).
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-9375-g3m3-9jvgLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
