GHSA-9823-P8PG-RFM4
API item/changes leaks instance-wide item change metadata to callers with no folder access
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-9823-P8PG-RFM4 divulgada · CVSS 4.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The delta-sync endpoint `GET /api/v1/item/changes` scopes the revision journal with a sentinel folder id of `0` when the caller has no accessible folders. Because `items_revisions.previous_folder_id` is `NOT NULL DEFAULT '0'` and is only populated on a move, the clause `r.previous_folder_id IN (0)` matches every non-move journal row in the instance. An API caller with zero folder access receives a `removed[]` entry for every item changed anywhere in the instance within the sync window.
Details
`app/api/Controller/Api/ItemController.php`:
$safeFolders = implode(
',',
$folderAccessModel->normalizeFolderIds($userData['folders_list'] ?? '')
) ?: '0';
...
$journalScopeSql = ' AND (r.folder_id IN (' . $safeFolders . ')'
. ' OR r.previous_folder_id IN (' . $safeFolders . ')';The `?: '0'` sentinel is correct for `items.id_tree` (no folder has id 0, so the clause matches nothing) but wrong for `previous_folder_id`, whose schema default *is* 0:
`previous_folder_id` INT(12) NOT NULL DEFAULT '0' COMMENT 'Source folder, set on move only',Every creation, update, deletion and restore therefore carries `previous_folder_id = 0` and falls inside the scope. `ItemModel::getItemChanges()` then classifies those rows: the item visibility query correctly returns nothing, but the second, deliberately unscoped existence probe still runs, so each candidate is emitted in `removed[]` rather than being dropped.
The leak is metadata only — `removed[]` carries `{id, revision, reason}`. Item labels, passwords and custom fields are never disclosed, because the payload materialization path (`getItems()`) applies the visibility constraint correctly. What an unauthorized caller learns is the set of item ids that exist and change, their change ordering, and the instance's activity rate.
PoC
- Create an API-enabled user with no folder rights (`folders_list` empty).
- Authenticate and call `GET /api/v1/item/changes?since=0&limit=200` to obtain a cursor, then call it again with that cursor.
- The response returns `removed` entries for items across the whole instance, none of which the caller may read.
Impact
Information disclosure of item identifiers and change activity to authenticated API callers outside their authorization scope. No secret material is exposed.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Versiones afectadas
3.2.2.0Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistnilsteampassnet/teampass |
Sin parche | — | — | — |
Arsenal 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-9823-p8pg-rfm4Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
