Disclosure: Matrix Bridges Security Issues
Three vulnerabilities in Matrix bridges were disclosed: an OpenID token exchange did not verify the server part of the user ID, allowing a malicious server to impersonate users; IRC admin commands could be injected via newlines; and the IRC bridge cached messages without validating room IDs, allowing crafted replies to leak message content from other rooms.
matrix.org
Published on matrix.org
Hi folks. As previously mentioned on Monday, we’re now disclosing the vulnerabilities patched for the IRC, Slack and Hookshot bridges.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely missing validation of user-supplied identifiers (server name in OpenID token, newlines in commands, room ID in cache lookups) allowed attackers to bypass intended restrictions.
Impact
An attacker could impersonate users, execute IRC commands as the bridge bot, or leak parts of messages from other bridged rooms.
What the attacker needed
Access to the bridge; ability to send crafted events or commands
The fix
The vulnerabilities were fixed by adding validation: checking the server part of the user ID, making command parsing stricter and validating channel names, and validating room IDs when accessing the cache.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
These are three separate bugs in software that connects Matrix chat to other networks like IRC and Slack. One let a fake server pretend to be a user, one let someone sneak extra commands into the bridge, and one let someone trick the bridge into showing messages from private rooms. All were fixed after being reported.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.