llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · nilsteampassnet/teampass

GHSA-JR9Q-X7PJ-8QH9

Item access check accepts blocked ancestor folders: a user granted a subfolder reads the passwords of its parent folders

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
6.5
Media
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición70 dDesde la divulgación, 12 sept 2026, 1:07 a. m.
Detección68 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. No hay versión corregida: aplique mitigaciones.
Respira hondo: esta no muerde… todavía.Esto lo arregla la rutina de siempre.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
12 sept 26
19 nov 26
21 nov 26
12 sept 26
29 sept 26
17 oct 26
4 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-JR9Q-X7PJ-8QH9 divulgada · CVSS 6.5 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Security Disclosure: TeamPass — the item access check accepts a folder the user cannot access (CWE-863)

Summary

`getCurrentAccessRights()` authorized an item from the user's cached folder tree instead of the
user's folder scope. That cache deliberately also contains the folders the tree displays as
blocked — the non-accessible ancestors of an accessible folder — and the check only tested
membership, never the `disabled` flag that marks them.

A user granted access to a subfolder therefore obtained read access to the items stored in its
parent folders, up to the root: item content, passwords, and attachments. No role, no grant and
no interaction from another user is needed; the parent folder is simply the one the tree shows them
as blocked.

Details

When the folder tree is built, `buildVisibleFoldersFromTree()` (`app/sources/tree.php:758`) walks the
nodes the tree emitted and appends every one of them to the per-user cache
(`teampass_cache_tree.visible_folders`), marking the ones the user cannot access:

// app/sources/tree.php:802
'disabled' => (
    !isset($accessibleFoldersSet[$folderId])
    || isset($readOnlyFoldersSet[$folderId])
) ? 1 : 0,

A blocked ancestor is stored with `disabled = 1`; it is in the list because the tree has to draw the
path down to the folder the user *can* open.

`getCurrentAccessRights()` (`app/sources/items.queries.php:8751`) then authorized on that list:

// app/sources/items.queries.php:8799
$visibleFolders = getUserVisibleFolders($userId);   // reads cache_tree.visible_folders
...
if (!in_array($treeId, array_column($visibleFolders, 'id'))) {
    return getAccessResponse(false, false, false, false);
}
...
return getAccessResponse(false, true, $edit, $delete, $editionLock, $create);

`array_column(..., 'id')` flattens the list to folder ids, so a blocked ancestor passes the test and
the function returns `access => true`. The rights that come with it are the ones
`getRoleBasedAccess()` resolves from `roles_values`, which holds no row for that folder, so `edit`,
`delete` and `create` stay `false`: the flaw grants read, not write.

Two consumers make that read worth a disclosure:

  • `get_item_password` (`app/sources/items.queries.php`, `case 'get_item_password'`) gates on
  • `userHasAccessToFile()` (`app/sources/main.functions.php:9466`) returns

Preconditions. An authenticated, non-administrator account holding at least one folder grant on a
folder that has an ancestor it cannot access, and a folder-tree cache already built for that account
— the normal state as soon as the user has loaded the Items page once. The fallback used while the
cache is empty or invalidated (`buildVisibleFoldersOnTheFly()`) rebuilds the list from
`roles_values` and `users_groups`, so it lists granted folders only and does not expose the
ancestor.

What is not affected. Items in folders that are not on the path between the root and a folder the
user can access are not reachable this way: they never enter that user's cached tree. Personal
folders of other users are not reachable either. Modification and deletion are refused, and an item
narrowed with the item-level restriction (`restricted_to` / `restriction_to_roles`) is refused before
this check on the web path — but see GHSA-gxc6-rgv6-wx99 for the REST API, which ignored that
restriction in the same releases.

Affected versions

All releases up to and including 3.2.2.3.

`getCurrentAccessRights()` has resolved item access from the cached tree since 3.1.2
(2024-10-03). Between 3.1.2 and the 3.1.7.x line the function had no membership test at all, so the
exposure is the same or wider there. The `disabled` flag that the check ignores was introduced with
the cache rewrite in 3.1.7.6.

TeamPass 2.x is out of scope: it does not have this code path.

Resolution

Fixed in 3.2.2.4 (commit `3b93a26fe`).

The folder is now checked against the scope TeamPass resolves for the request — accessible folders
and the user's own personal folders, minus explicit denials and other users' personal folders —
before any other rule, and the cached tree is no longer an authorization source:

// app/sources/items.queries.php, top of getCurrentAccessRights()
if (itemAccessFolderIsInScope(
        $treeId,
        (array) $session->get('user-accessible_folders'),
        (array) $session->get('user-personal_folders'),
        (array) $session->get('user-no_access_folders'),
        (array) $session->get('user-forbiden_personal_folders')
    ) === false
) {
    return getAccessResponse(false, false, false, false);
}

The decision itself lives in the database-free module `app/sources/item_access_logic.php` and is
covered by `tests/Unit/ItemAccessLogicTest.php`.

Workaround for operators who cannot upgrade immediately

There is no configuration switch that closes this. Until you can upgrade:

  • Do not store items directly in a folder that is an ancestor of a folder shared with users who must
  • An item-level restriction (Restricted to on the item) is honoured before this check on the web
  • Denying the folder to a role (forbidden folders) does not help: the vulnerable check never
Detection

The password reads are logged like any other. In the administration logs
(Monitoring → Logs → Items), or directly in `teampass_log_items`, look for `at_password_shown`,
`at_password_shown_edit_form`, `at_password_copied` and `at_shown` entries whose item belongs to a
folder the acting account has no grant on: a password cannot be obtained this way without one of
them. Attachment downloads are not logged (`app/sources/downloadFile.php` writes no audit
entry), so that part of the exposure cannot be reconstructed from the application logs; a web-server
access log showing `downloadFile.php` requests from the account is the only trace.

Credit

Found internally during the review of PR #5371.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
8.3/ 10Alto
Vector 8.3 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida
nilsteampassnet/teampass≤ 3.2.2.3
3.2.2.3
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistnilsteampassnet/teampass
Sin parche — — —
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/nilsteampassnet/TeamPass/security/advisories/GHSA-jr9q-x7pj-8qh9

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.