GHSA-GHJ3-WPPX-W8J3
delete_item also deletes any item matching a client-supplied key, without checking rights on it
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-GHJ3-WPPX-W8J3 divulgada · CVSS 5.4 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The item delete action (`delete_item` in `app/sources/items.queries.php`) receives an item id and an item key. It checked the caller's rights on the item designated by the id, then read the item and soft-deleted it with `WHERE id = %i OR item_key = %s`. Both values come from the request, and only one item was authorized: any other item matching the key was deleted along with it. Item keys are not secret. They are returned with every row of a folder's item list and with search results, including in folders where the user only has read access.
## Impact
An authenticated user who may delete at least one item can delete any item whose key
they can read. In practice, this means every item of every folder they can see,
including folders where their access level is `R`, `ND` or `NDNE`. Other users'
personal items are out of reach, because their keys are never shown to anyone else.
- 3.1.2 – 3.2.2.5: the delete right is checked on the folder of the first rowreturned by the query, which is the row with the lower id. The attack therefore works when the item the attacker may delete is older than the target. That is the usual situation for an established account, and its own personal items qualify. - 3.0.10 – 3.1.1: `delete_item` did not check the delete right at all, only ththe folder of the submitted item was visible to the caller. The deleted item disappears for every user and goes to the recycle bin, from which an administrator can restore it. Its history gets no `at_delete` entry, because only item the attacker was allowed to delete is logged, so the deletion cannot be attributed. No read access is gained. The REST API is not affected: `DELETE /item/delete` resolves the item by its id on ## Patches Fixed in 3.2.2.6 (commit 0055b3a
https://github.com/nilsteampassnet/TeamPass/com0055b3a8f04b2338df9238032f3dd2f85ccd2ac8). The key is now used only to find the item when no id is sent, before the access check. The item is then read and soft-delete that id alone.
Workarounds
None. Items deleted this way are listed in Utilities → Recycled bin and can be restored from there.
Every regular deletion path writes an `at_delete` history entry, so a deleted item without one is a candidate. The query below lists them; replace `teampass_` with your table prefix. Older releases and manual database changes can also leave such rows, so review the results before restoring anything.
SELECT i.id, i.label, i.id_tree,
FROM_UNIXTIME(CAST(i.deleted_at AS UNSIGNED)) AS deleted_on
FROM teampass_items AS i
WHERE i.inactif = 1
AND i.deleted_at IS NOT NULL AND i.deleted_at <> ''
AND NOT EXISTS (
SELECT 1 FROM teampass_log_items AS l
WHERE l.id_item = i.id AND l.action = 'at_delete'
);The detection query runs as written on the local database. It returns 2 legacy candidates out of 32 deleted 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 |
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-ghj3-wppx-w8j3Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
