GHSA-VRW4-G73X-P7Q7
Domain administrators can train the global SpamAssassin Bayesian database
Texto original en inglés · Ver en español
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-VRW4-G73X-P7Q7 divulgada · CVSS 4.1 (GitHub) | |
| Remediación | Parche 2.13.0 | modoboa · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The quarantine `mark_selection` action permits an authenticated domain administrator to train SpamAssassin using the configured default Bayesian database, even when the administrator should be limited to a dedicated domain database. When manual learning is enabled for domain administrators, the action defaults every non-`SimpleUsers` caller to `database="global"`. It also accepts a caller-supplied `database` string without role or allowed-database validation. The queued worker maps `global` to the configured `default_user` and passes that identity to `sa-learn -u` or `spamc -u`.
Details
The application describes `domain_level_learning` as allowing domain administrators to train within dedicated per-domain databases, while `default_user` names the default Bayesian database. The request must select a quarantine message and recipient that the administrator can access; this is a database-scope bypass, not a bypass of message-recipient access. The same default-global behavior occurs when only `user_level_learning` is enabled, because that setting also makes `manual_learning_enabled` true for domain administrators.
Proof of concept
- `MarkMessageSelectionSerializer`
https://github.com/modoboa/modoboa/blob/2.12.0/modoboa/amavis/serializers.py#L122accepts `database` as an optional, unconstrained `CharField`. - `QuarantineViewSet.mark_selection`
https://github.com/modoboa/modoboa/blob/2.12.0/modoboa/amavis/viewsets.py#L250checks access to each selected message and calls `manual_learning_enabled`, but does not authorize the requested learning database. When `database` is omitted, it chooses `"global"` for every role other than `SimpleUsers` and enqueues that value. - `manual_learning_enabled`
https://github.com/modoboa/modoboa/blob/2.12.0/modoboa/amavis/lib.py#L336allows a domain administrator to learn when `domain_level_learning` or `user_level_learning` is enabled. - `tasks.manual_learning`
https://github.com/modoboa/modoboa/blob/2.12.0/modoboa/amavis/tasks.py#L11forwards the queued database name unchanged to `SpamassassinClient`. - `SpamassassinClient._learn`
https://github.com/modoboa/modoboa/blob/2.12.0/modoboa/amavis/lib.py#L182uses `default_user` for `global`, the recipient\'s domain for `domain`, and passes that username to the learning command. The SpamAssassin `sa-learn` documentationhttps://spamassassin.apache.org/full/4.0.x/doc/sa-learn.htmlstates that `-u` selects the user identity used for per-user Bayesian storage.
Impact
When manual SpamAssassin learning is enabled for domain administrators
(`domain_level_learning`) or for users (`user_level_learning`), the
`POST /api/v2/amavis/quarantine/mark_selection/` endpoint did not check
which Bayesian database the caller was allowed to train.
A domain administrator (or reseller) could send `"database": "global"`, or simply
leave the `database` field out (`global` was the server-side default for every
non-simple-user role). Messages from their own domain were then learned as
spam or ham into the database owned by the `default_user` setting
(`amavis` by default). Domains that do not have a dedicated per-domain
database use this database for filtering, so a domain administrator could
change spam filtering for other tenants.
Access to the messages themselves was still enforced: only quarantined
messages addressed to recipients the administrator manages could be used.
The web interface only offers the global database to super administrators.
The bug is reachable through direct API calls. It can also be reached by
API clients that leave out the `database` field.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
pypimodoboa |
Corregida | 2.13.0 | 0 d | 2.13.0 no afectada |
2.13.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/modoboa/modoboa/security/advisories/GHSA-vrw4-g73x-p7q7Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
