This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
HTML injection in search results via plaintext message highlighting
Package
matrix-react-sdk
(React)
Affected versions
<= 3.70.0
Patched versions
3.71.0
Impact
Plain text messages containing HTML tags are rendered as HTML in the search results. To exploit this, an attacker needs to trick a user into searching for a specific message containing an HTML injection payload.
Cross-site scripting is possible by including resources from
recaptcha.net
andgstatic.com
which are included in the default CSP.Thanks to Cadence Ember for finding the injection and to S1m for finding possible XSS vectors.
Patches
Version 3.71.0 of the SDK fixes the issue.
Workarounds
Restarting the client will clear the injection.