CVE-2023-30609
JSON

5.4medium

matrix-react-sdk vulnerable to HTML injection in search results via plaintext message highlighting

Severity
5.4medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.62% (higher than 50% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-xv83-x443-7rmw

Description

matrix-react-sdk is a react-based SDK for inserting a Matrix chat/VoIP client into a web page. Prior to version 3.71.0, 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. No cross-site scripting attack is possible due to the hardcoded content security policy. Version 3.71.0 of the SDK patches over the issue. As a workaround, restarting the client will clear the HTML injection.

Affected

Product or packageVersionsReported by
matrix-org matrix-react-sdk< 3.71.0CVE List
matrix-react-sdk (npm)before 3.71.0GitHub Advisory Database
matrix-react-sdk_project matrix-react-sdkbefore 3.71.0NVD

All scores

GitHub_M5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:L/A:L
GitHub8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:L
NVD4.7medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N

Classification

CWE-74CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

matrix-react-sdk is a react-based SDK for inserting a Matrix chat/VoIP client into a web page. Prior to version 3.71.0, 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. No cross-site scripting attack is possible due to the hardcoded content security policy. Version 3.71.0 of the SDK patches over the issue. As a workaround, restarting the client will clear the HTML injection.

GitHub Advisory Database
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 and gstatic.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

Sources

SourceRecordLicence
CVE ListCVE-2023-30609 changed 2025-02-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-xv83-x443-7rmw changed 2023-11-08CC-BY-4.0
NVDCVE-2023-30609 changed 2026-06-17Public domain