CVE-2023-37259: Cross site scripting in Export Chat feature

Published Jul 18, 2023
·
Updated

Description

The Export Chat feature includes certain attacker-controlled elements in the generated document without sufficient escaping, leading to stored XSS.

Impact

Since the Export Chat feature generates a separate document, an attacker can only inject code run from the null origin, restricting the impact.

However, the attacker can still potentially use the XSS to leak message contents. A malicious homeserver is a potential attacker since the affected inputs are controllable server-side.

Patches This was patched in matrix-react-sdk 3.76.0.

Workarounds None, other than not using the Export Chat feature.

References N/A

Other sources

matrix-react-sdk is a react-based SDK for inserting a Matrix chat/voip client into a web page. The Export Chat feature includes certain attacker-controlled elements in the generated document without sufficient escaping, leading to stored Cross site scripting (XSS). Since the Export Chat feature generates a separate document, an attacker can only inject code run from the null origin, restricting the impact. However, the attacker can still potentially use the XSS to leak message contents. A malicious homeserver is a potential attacker since the affected inputs are controllable server-side. This issue has been addressed in commit 22fcd34c60 which is included in release version 3.76.0. Users are advised to upgrade. The only known workaround for this issue is to disable or to not use the Export Chat feature.

Affected Software

4 affected componentsFixes available
npm/matrix-react-sdk>=3.32.0<3.76.0
3.76.0
Matrix-react-sdk Project Matrix-react-sdk Node.js>=3.32.0<3.76.0
Matrix-react-sdk Project Matrix-react-sdk Node.js=3.76.0-rc1
Matrix-react-sdk Project Matrix-react-sdk Node.js=3.76.0-rc2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/matrix-react-sdk to a version that resolves this vulnerability.

    Fixed in 3.76.0
  2. Upgrade

    Upgrade matrix-react-sdk to a version that resolves this vulnerability.

    Fixed in 3.76.0Patch 22fcd34c60
  3. Configuration

    Disable or do not use the Export Chat feature as the workaround for the stored XSS vulnerability.

    matrix-react-sdk Export Chat feature use_export_chat = disabled

Event History

Jul 18, 2023
Advisory Published
04:58 PM
CVE Published
via MITRE·04:59 PM
Data Sourced
via MITRE·04:59 PM
DescriptionSeverityWeakness
Data Sourced
05:15 PM
DescriptionWeakness
Data Sourced
via NVD·05:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2023-37259?

CVE-2023-37259 is considered a high severity vulnerability due to the potential for stored cross-site scripting (XSS) attacks.

2

How do I fix CVE-2023-37259?

To fix CVE-2023-37259, you should update the Matrix React SDK to version 3.76.0 or later.

3

What is stored XSS in the context of CVE-2023-37259?

Stored XSS in CVE-2023-37259 refers to the ability of an attacker to inject malicious scripts into generated documents via the Export Chat feature.

4

Which versions of the Matrix React SDK are affected by CVE-2023-37259?

CVE-2023-37259 affects Matrix React SDK versions between 3.32.0 and 3.76.0, inclusive.

5

Can CVE-2023-37259 affect user data security?

Yes, CVE-2023-37259 can compromise user data security by allowing attackers to execute scripts within the context of a user's session.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203