GHSA-6RQ2-HF9C-CXH2
user_only_personal_items_encryption trusts a client-supplied user id: any authenticated user can wipe another user's personal item keys
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-6RQ2-HF9C-CXH2 divulgada · CVSS 7.1 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
After a user's encryption keys are regenerated, TeamPass may ask them to re-encrypt their personal items. That dialog posts to `user_only_personal_items_encryption` in `app/sources/main.queries.php`, and the handler read the target account from the `userId` field of the request payload. The authorization guard in `keyHandler()` only inspects a field named `user_id`, so `userId` was never checked against the session: any authenticated user could run the action against any other account.
Impact
The action has two branches:
- "I no longer remember my previous password" (3.1.4.41 – 3.2.2.5): no secret is required. Every sharekey the targeted user holds on their personal items is overwritten with an empty value. So is a subset of their sharekeys on attachments and custom fields, selected through a join on the wrong identifier, which can also hit shared objects. The user's personal passwords then display as empty, and the account's pending status is reset. User ids are sequential integers, so every account can be targeted in turn.
- Re-encryption from a previous password (3.1.4.40 – 3.2.2.5): requires a former password of the targeted user. It queues a re-encryption of that user's personal items and resets some of their account status flags.
Nothing is disclosed to the caller in either case, and the action writes no log entry.
Whether the damage can be undone depends on the item:
- Personal items created in TeamPass 3.x normally also carry a sharekey for the internal recovery account (TP_USER). After upgrading, generating new encryption keys for the affected user (from the user menu, or by an administrator) re-keys them from it.
- Personal items that only ever had the owner's sharekey, notably items converted from TeamPass 2.x with the personal saltkey dialog, can only be restored from a database backup of the user's `sharekeys_items` rows taken before the attack.
Patches
Fixed in 3.2.2.6: the action now always targets the user resolved by `keyHandler()`, that is, the session user. The same release restricts the "I no longer remember" reset to the sharekeys a key generation could not re-key, and fixes the identifiers used for attachments and custom fields.
Workarounds
None short of upgrading. Blocking, at a reverse proxy, the POST requests to `sources/main.queries.php` whose `type` is `user_only_personal_items_encryption` disables the dialog for every user, legitimate use included.
The accounts whose personal items were emptied can be listed with the query below (`teampass_` is the default table prefix). A legitimate use of the "I no longer remember my previous password" option leaves the same state, so a match is not proof of an attack.
SELECT s.user_id, COUNT(*) AS emptied_sharekeys
FROM teampass_sharekeys_items AS s
INNER JOIN teampass_items AS i ON i.id = s.object_id
WHERE i.perso = 1 AND s.share_key = ''
GROUP BY s.user_id;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-6rq2-hf9c-cxh2Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
