Lucene search

K
githubGitHub Advisory DatabaseGHSA-XV83-X443-7RMW
HistoryApr 25, 2023 - 7:48 p.m.

HTML injection in search results via plaintext message highlighting

2023-04-2519:48:11
CWE-74
CWE-79
GitHub Advisory Database
github.com
19
plaintext message highlighting
search results
html injection
cross-site scripting
recaptcha.net
gstatic.com
default csp
sdk
injection
xss vectors
client restart

5.4 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

NONE

Integrity Impact

LOW

Availability Impact

LOW

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:L/A:L

0.001 Low

EPSS

Percentile

37.4%

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.

Affected configurations

Vulners
Node
matrix-react-sdk_projectmatrix-react-sdkRange<3.71.0node.js
CPENameOperatorVersion
matrix-react-sdklt3.71.0

5.4 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

NONE

Integrity Impact

LOW

Availability Impact

LOW

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:L/A:L

0.001 Low

EPSS

Percentile

37.4%