Executive brief
The Matrix AppService IRC bridge is software that relays messages between Matrix chat rooms and IRC channels. A malicious Matrix server can trick the bridge into leaking message content from rooms it shouldn't access by fabricating timestamps, potentially exposing private chat messages to unauthorized parties.
Technical details
The vulnerability is an insecure data validation issue (CWE-280, CWE-755) in the matrix-appservice-irc bridge. The bridge uses a homeserver-provided timestamp (origin_server_ts) to determine if a user has access to an event before including truncated message content in IRC replies. Since an external Matrix homeserver controls this timestamp, a malicious homeserver can fabricate it to bypass access control checks and trick the bridge into leaking room messages it should not have visibility into. The attack requires the malicious homeserver to be joined to a room with the bridge. Fixed in version 2.0.1 by replacing timestamp-based validation with internally-tracked event timestamps.
Affected products
- Matrix.org AppService IRC <= 2.0.0
Timeline
- 2024-07-05: disclosed
- 2024-07-05: patched: Version 2.0.1 released