What’s Vulnerable › Vulnerabilities
CVE-2021-32622: File upload local preview can run embedded scripts after user interaction
- Severity: high (CVSS 7.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-05-17 · updated 2026-06-17
- Weakness: CWE-74
Description
Matrix-React-SDK is a react-based SDK for inserting a Matrix chat/voip client into a web page. Before version 3.21.0, when uploading a file, the local file preview can lead to execution of scripts embedded in the uploaded file. This can only occur after several user interactions to open the preview in a separate tab. This only impacts the local user while in the process of uploading. It cannot be exploited remotely or by other users. This vulnerability is patched in version 3.21.0.
Affected products
- matrix-org matrix-react-sdk: before 3.21.0 — fixed in 3.21.0
How to fix
Upgrade to a fixed version: matrix-org matrix-react-sdk 3.21.0. Check the vendor advisory for mitigations.
References
- https://github.com/matrix-org/matrix-react-sdk/pull/5981
- https://github.com/matrix-org/matrix-react-sdk/security/advisories/GHSA-8796-gc9j-63rv
- https://github.com/matrix-org/matrix-react-sdk/pull/5981
- https://github.com/matrix-org/matrix-react-sdk/security/advisories/GHSA-8796-gc9j-63rv
Get alerted when CVE-2021-32622 or the next vulnerability affects your stack