CVE-2021-32659
JSON

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 packageVersionsReported by
matrix-org matrix-appservice-bridge< 2.6.1CVE List
matrix-appservice-bridge (npm)before 2.6.1GitHub Advisory Database
matrix matrix-appservice-bridgebefore 2.6.1NVD

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
NVD4.9medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N
NVD3.5low CVSS:2.0AV: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

Sources

SourceRecordLicence
CVE ListCVE-2021-32659 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-35g4-qx3c-vjhx changed 2026-07-08CC-BY-4.0
NVDCVE-2021-32659 changed 2026-06-17Public domain