GHSA-32HP-P55X-WR8V
A read-only folder role does not prevent renaming a shared folder and changing its settings
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-32HP-P55X-WR8V divulgada · CVSS 4.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
A user whose only access to a shared folder is a read-only (R) role could rename that folder and change its settings. The `update_folder` action of the Items page (`app/sources/folders.queries.php`) has a per-folder read-only check, but it never matched. The `update_folder` action of `app/sources/items.queries.php` has no per-folder check at all. A second, lower-impact gap let any user who can see an item release another user's edit lock on it.
Details
Paths and line numbers are those of 3.2.4.2.
- The session list `user-read_only_folders` is filled with the `folder_id` values the database returns (`app/sources/main.functions.php:886`, stored at `:795`). MeekroDB returns them as strings (`"12"`).
- `folders.queries.php`, `update_folder`, casts the submitted id to an integer and compares it strictly with that list (`:424`, `in_array($inputData['id'], $session->get('user-read_only_folders'), true)`). An integer never equals a string under a strict comparison, so the check never refuses anything. This is the request the Items page sends when a folder is edited. It renames the folder and can change its parent (within the folders the user can access), complexity, icons, renewal period and item creation and edition restrictions. The last gate (`:663`) lets it through for a manager, an HR manager, a user holding the root-folder creation right, or any user when *Users can create folders* is enabled.
- `items.queries.php`, `update_folder` (`:4596`), checks the session key, the account-wide read-only flag and the folder's visibility (`:4629`). Read-only folders are part of the visible folders, so it renames the folder and updates its complexity. No interface sends this request, but any authenticated user can post it.
- `items.queries.php`, `free_item_for_edition` (`:7274`), only checks that the caller can see the item, then deletes every edit lock of that item. Its only caller is the forced unlock of the Database page in the administration.
The REST API (`FolderModel::updateFolder()`) reads the access level from the database and was not affected.
The strict comparison of point 2 was added in 3.2.0.0 to close this exact case, and never worked. Before 3.2.0.0, neither handler had a per-folder check.
Credits: reported by @p-w, who found the `items.queries.php` path and the edit lock. The maintainer found the `folders.queries.php` path while checking the fix.
Impact
An authenticated user with a read-only role on a shared folder could rename it for everyone, move it under another folder they can access, raise its password complexity requirement (which can block item creation by others), and change its icons, renewal period and creation and edition restrictions. On the Items page path, the user also needs one of the conditions of point 2.
No password or item content is exposed: item secrets stay protected by the per-user sharekeys, which this path does not touch. Personal folders are not concerned.
The edit lock gap lets a user interrupt another user's edition session on an item they can see. It does not change or disclose data.
Patches
Fixed in 3.2.4.3:
- both `update_folder` actions refuse a folder of `user-read_only_folders`, comparing integers on both sides;
- `free_item_for_edition` is reserved to administrators, and to managers and HR managers on the items they can access, the users who reach the Database page. Administrators, who hold no folder access, can now use the forced unlock of that page, which refused them silently since 3.2.0.0.
Workarounds
None short of upgrading. Disabling *Users can create folders* narrows the Items page path to managers, HR managers and users with the root-folder creation right, but leaves the `items.queries.php` path open to every user with a read-only role.
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.3 | — | — |
3.2.4.3Arsenal 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-32hp-p55x-wr8vLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
