llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · egroupware/egroupware

GHSA-QCHV-95C6-F8PC

Cross-user shared-mailbox folder enumeration via account_id=0 type-juggling in mail_acl.ajax_folders

Texto original en inglés · Ver en español

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
4.3
Media
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/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ón93 dDesde la divulgación, 19 ago 2026, 12:56 a. m.
Detección91 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Monitoreo
Detectada +1
19 ago 26
20 ago 26
18 nov 26
21 nov 26
19 ago 26
11 sept 26
5 oct 26
28 oct 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-QCHV-95C6-F8PC divulgada · CVSS 4.3 (GitHub)
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

## Summary
`mail_acl::ajax_folders` gates admin access with `!empty($_GET['account_id'])`. Passing `account_id=0` makes `!empty('0') === false`, skipping the admin gate for a non-admin. `Account::read($_GET['acc_id'], '0')` then skips its ownership filter because `$called_for === '0'`, loading an arbitrary account. Credentials stored with `account_id=0` are SYSTEM_AES-encrypted (decryptable by anyone), so a non-member can enumerate the IMAP folder tree of shared/group mailboxes. Personal mailboxes are protected (user-AES credentials do not decrypt for another user).

## Root Cause
- `mail/inc/class.mail_acl.inc.php:307-314` — `if (!empty($_GET['account_id']) && !$…['user']['apps']['admin']) throw;` bypassed by `account_id=0` (`!empty('0') === false`).
- `api/src/Mail/Account.php:1092-1096` — ownership WHERE clause is dropped when `$called_for === '0'`, loading an arbitrary `acc_id`.
- `Credentials::read(acc_id, null, '0')` fetches only `account_id=0` (SYSTEM_AES) rows, decrypted with the system DB password → decrypts for any user.

## Impact
A non-member enumerates the full IMAP folder names (`ajax_folders` returns `{id,label}`) of any shared/group/organizational (account_id=0) mailbox. No message content is exposed. Personal single-user mailboxes are not affected (their USER_AES credentials do not decrypt for a different user → IMAP login fails). Confidentiality-only, low magnitude.

## Proof of Concept
`GET json.php?menuaction=mail.mail_acl.ajax_folders&acc_id=<shared_acc_id>&account_id=0&query=`

## Attack Chain
1. Entry: GET `mail.mail_acl.ajax_folders&acc_id=<shared_acc_id>&account_id=0`. Guard: admin check (mail_acl:309). Bypass proof: `!empty('0') === false` → gate skipped.
2. Sink-1: `Account::read(<acc_id>,'0')`. Guard: ownership WHERE (Account.php:1092-1096). Bypass proof: `$called_for === '0'` disables it → arbitrary acc_id loaded.
3. Sink-2: `Credentials::read(acc_id,null,'0')` → SYSTEM_AES decrypt succeeds for `account_id=0` rows → `imapServer(false)` → `getSubfolders()` returned to attacker. Guard: per-user credential encryption. Bypass proof: `account_id=0` creds are never user-encrypted → not UNAVAILABLE.
4. Impact: non-member enumerates the folder tree of any shared mailbox.

## Bypass Evidence
Subagent confirmed the two type-juggling defects and the scope narrowing: personal mailboxes return no `account_id=0` rows and `decrypt()` yields UNAVAILABLE for a different user → no leak. Only shared/system-credential mailboxes are enumerable. Code present on HEAD (mail_acl:307-314, Account.php:1092-1096).

## Affected Versions
`<= 26.7.20260702`.

## Suggested Fix
Use strict comparison / `isset()` instead of `!empty()` for the `account_id` admin gate, and never disable the ownership filter on a literal `'0'` sentinel; require the admin app right for any cross-account folder listing.

---
Reported by zx (Jace) — GitHub: @manus-use

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

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:L
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida
egroupware/egroupware≤ 26.7.20260710.3
egroupware/egroupware≤ 23.1.20260710.3
23.1.20260710.3
26.7.20260710.3
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistegroupware/egroupware
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/EGroupware/egroupware/security/advisories/GHSA-qchv-95c6-f8pc

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