Executive brief
matrix-appservice-irc is a bridge that allows Matrix users to communicate with IRC channels. A parsing bug in mode commands (which set user permissions in IRC rooms) can cause the wrong user to be granted channel operator privileges. An attacker would need to trick a room operator into executing a malformed mode command, potentially leading to unauthorized privilege escalation and channel takeover.
Technical details
The vulnerability is an incorrect privilege assignment flaw (CWE-266) in the underlying matrix-org/node-irc library's parsing of IRC mode commands. When multiple modes are specified in a single command, the parser incorrectly associates mode parameters with the wrong users, resulting in incorrect privilege assignment. This requires high privilege level (operator status) and user interaction (social engineering) to trigger. An attacker can achieve privilege escalation by tricking an operator into running a crafted mode command. The issue was patched in version 0.35.0 of matrix-appservice-irc.
Affected products
- The Matrix.org Foundation matrix-appservice-irc <0.35.0
Timeline
- 2022-09-15: disclosed: GHSA-cq7q-5c67-w39w published
- 2022-09-15: patched: Version 0.35.0 released with fix