HTML injection in search results via plaintext message highlighting
High severity
GitHub Reviewed
Published
Apr 25, 2023
in
matrix-org/matrix-react-sdk
•
Updated Nov 4, 2023
Description
Published to the GitHub Advisory Database
Apr 25, 2023
Reviewed
Apr 25, 2023
Published by the National Vulnerability Database
Apr 25, 2023
Last updated
Nov 4, 2023
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.
References