6.5medium
Automatic room upgrade handling can be used maliciously to bridge a room non-consentually
- Severity
- 6.5medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.94% (higher than 61% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-35g4-qx3c-vjhx
Description
Matrix-appservice-bridge is the bridging service for the Matrix communication program's application services. In versions 2.6.0 and earlier, if a bridge has room upgrade handling turned on in the configuration (the `roomUpgradeOpts` key when instantiating a new `Bridge` instance.), any `m.room.tombstone` event it encounters will be used to unbridge the current room and bridge into the target room. However, the target room `m.room.create` event is not checked to verify if the `predecessor` field contains the previous room. This means that any malicious admin of a bridged room can repoint the traffic to a different room without the new room being aware. Versions 2.6.1 and greater are patched. As a workaround, disabling the automatic room upgrade handling can be done by removing the `roomUpgradeOpts` key from the `Bridge` class options.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| matrix-org matrix-appservice-bridge | < 2.6.1 | CVE List |
| matrix-appservice-bridge (npm) | before 2.6.1 | GitHub Advisory Database |
| matrix matrix-appservice-bridge | before 2.6.1 | NVD |
All scores
| GitHub_M | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| NVD | 4.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N |
| NVD | 3.5low CVSS:2.0 | AV:N/AC:M/Au:S/C:N/I:P/A:N |
Classification
What each source says
CVE List
Matrix-appservice-bridge is the bridging service for the Matrix communication program's application services. In versions 2.6.0 and earlier, if a bridge has room upgrade handling turned on in the configuration (the `roomUpgradeOpts` key when instantiating a new `Bridge` instance.), any `m.room.tombstone` event it encounters will be used to unbridge the current room and bridge into the target room. However, the target room `m.room.create` event is not checked to verify if the `predecessor` field contains the previous room. This means that any malicious admin of a bridged room can repoint the traffic to a different room without the new room being aware. Versions 2.6.1 and greater are patched. As a workaround, disabling the automatic room upgrade handling can be done by removing the `roomUpgradeOpts` key from the `Bridge` class options.
GitHub Advisory Database
Impact
If a bridge has room upgrade handling turned on in the configuration (the roomUpgradeOpts key when instantiating a new Bridge instance.), any m.room.tombstone event it encounters will be used to unbridge the current room and bridge into the target room. However, the target room m.room.create event is not checked to verify if the predecessor field contains the previous room. This means that any mailcious admin of a bridged room can repoint the traffic to a different room without the new room being aware.
Patches
Versions 2.6.1 and greater are patched.
Workarounds
Disabling the automatic room upgrade handling can be done by removing the roomUpgradeOpts key from the Bridge class options.
References
The issue is patched by https://github.com/matrix-org/matrix-appservice-bridge/pull/330
For more information]
If you have any questions or comments about this advisory, email us at security@matrix.org.
NVD (es)
Matrix-appservice-bridge es el servicio de bridge para los servicios de aplicación del programa de comunicación Matrix. En versiones 2.6.0 y anteriores, si un bridge presenta activada la administración de actualización de salas en la configuración (la clave "roomUpgradeOpts" al instanciar una nueva instancia de "Bridge"), cualquier evento "m.room.tombstone" que encuentre será usada para deshacer el bridge de la sala actual y pasar a la sala de destino. Sin embargo, el evento "m.room.create" de la sala de destino no es comprobado para verificar si el campo "predecessor" contiene la sala anterior. Esto significa que cualquier administrador malicioso de una sala bridged puede redirigir el tráfico a una sala diferente sin que la nueva sala lo sepa. Las versiones 2.6.1 y superiores están parcheadas. Como solución, deshabilitando el manejo de la actualización automática de salas eliminando la clave "roomUpgradeOpts" de las opciones de la clase "Bridge"
References
| https://github.com/matrix-org/matrix-appservice-bridge/security/advisories/GHSA-35g4-qx3c-vjhx | mitigation, third-party-advisory, web | |
| https://github.com/matrix-org/matrix-appservice-bridge/commit/b69e745584a34fcfd858df33e4631e420da07b9f | patch, third-party-advisory, web | |
| https://github.com/matrix-org/matrix-appservice-bridge/releases/tag/2.6.1 | patch, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-32659 | advisory | |
| https://github.com/matrix-org/matrix-appservice-bridge/pull/330 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-32659 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-35g4-qx3c-vjhx changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-32659 changed 2026-06-17 | Public domain |