Podatność w serwerze czatu Conduit i jego pochodnych (continuwuity, Grapevine, tuwunel) umożliwia zdalnemu, nieuwierzytelnionemu atakującemu zmuszenie serwera do kryptograficznego podpisania dowolnych zdarzeń członkostwa w pokojach Matrix. Jest to krytyczna luka, gdyż pozwala na podszywanie się pod użytkowników, usuwanie ich z pokojów oraz uzyskiwanie nieautoryzowanego dostępu do prywatnych konwersacji.
▸ Pokaż oryginał (EN)
Conduit is a chat server powered by Matrix. A vulnerability that affects a number of Conduit-derived homeservers allows a remote, unauthenticated attacker to force the target server to cryptographically sign arbitrary membership events. Affected products include Conduit prior to version 0.10.10, continuwuity prior to version 0.5.0, Grapevine prior to commit `9a50c244`, and tuwunel prior to version 1.4.8. The flaw exists because the server fails to validate the origin of a signing request, provided the event's state_key is a valid user ID belonging to the target server. Attackers can forge "leave" events for any user on the target server. This forcibly removes users (including admins and bots) from rooms. This allows denial of service and/or the removal of technical protections for a room (including policy servers, if all users on the policy server are removed). Attackers can forge "invite" events from a victim user to themselves, provided they have an account on a server where there is an account that has the power level to send invites. This allows the attacker to join private or invite-only rooms accessible by the victim, exposing confidential conversation history and room state. Attackers can forge "ban" events from a victim user to any user below the victim user's power level, provided the victim has the power level to issue bans AND the target of the ban resides on the same server as the victim. This allows the attacker to ban anyone in a room who is on the same server as the vulnerable one, however cannot exploit this to ban users on other servers or the victim themself. Conduit fixes the issue in version 0.10.10. continuwuity fixes the issue in commits `7fa4fa98` and `b2bead67`, released in 0.5.0. tuwunel fixes the issue in commit `dc9314de1f8a6e040c5aa331fe52efbe62e6a2c3`, released in 1.4.8. Grapevine fixes the issue in commit `9a50c2448abba6e2b7d79c64243bb438b351616c`. As a workaround, block access to the `PUT /_matrix/federation/v2/invite/{roomId}/{eventId}` endpoint using your reverse proxy.
Błąd wynika z braku walidacji pochodzenia żądania podpisania (origin validation) — serwer podpisze zdarzenie, jeśli pole state_key zawiera prawidłowy identyfikator użytkownika należącego do tego serwera, niezależnie od tego, kto faktycznie wysyła żądanie. Atakujący może w ten sposób sfałszować zdarzenia typu 'leave' (wymuszające usunięcie dowolnego użytkownika z pokoju, w tym administratorów i botów), 'invite' (zaproszenie siebie do prywatnego pokoju w imieniu ofiary) oraz 'ban' (zbanowanie użytkowników poniżej poziomu uprawnień ofiary, jeśli ofiara i cel bana są na tym samym serwerze). Atak jest możliwy zdalnie i bez żadnego uwierzytelnienia.
Atakujący może doprowadzić do odmowy usługi (DoS) poprzez masowe usuwanie użytkowników z pokojów, usunąć techniczne zabezpieczenia pokoju (np. serwery polityk), uzyskać nieautoryzowany dostęp do historii prywatnych konwersacji oraz manipulować członkostwem w pokojach poprzez fałszywe bany lub zaproszenia.
Należy zaktualizować oprogramowanie: Conduit do wersji 0.10.10, continuwuity do wersji 0.5.0, tuwunel do wersji 1.4.8, Grapevine do commitu 9a50c2448abba6e2b7d79c64243bb438b351616c. Jako obejście (workaround) należy zablokować dostęp do endpointu PUT /_matrix/federation/v2/invite/{roomId}/{eventId} na poziomie reverse proxy.
Conduit w wersjach wcześniejszych niż 0.10.10; continuwuity w wersjach wcześniejszych niż 0.5.0; Grapevine w wersjach przed commitem 9a50c244; tuwunel w wersjach wcześniejszych niż 1.4.8.
Podatność dotyczy wyłącznie serwerów homeserver opartych na implementacji Conduit (nie dotyczy innych implementacji serwera Matrix, np. Synapse). Jako tymczasowe obejście producent wskazuje blokadę konkretnego endpointu federacyjnego na reverse proxy.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:L/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X