# CVE-2021-32622: File upload local preview can run embedded scripts after user interaction

- Severity: Medium 4.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.37%, higher than 33% of CVEs (2026-12-01)
- Published: 2021-05-17T19:35:11.000Z
- Modified: 2026-07-08T06:49:32.495Z
- Also known as: GHSA-8796-gc9j-63rv, GHSA-cg57-p69r-3m7p
- Weaknesses: CWE-74, CWE-434
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- matrix-org matrix-react-sdk: < 3.21.0
- matrix-react-sdk (npm): before 3.21.0
- matrix-react-sdk_project matrix-react-sdk: before 3.21.0

## Every score

- GitHub_M: CVSS:3.1 4.2 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L`
- GitHub: CVSS:3.1 4.2 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 4.4 Medium `AV:L/AC:M/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/matrix-org/matrix-react-sdk/security/advisories/GHSA-8796-gc9j-63rv> (patch, third-party-advisory, web)
- <https://github.com/matrix-org/matrix-react-sdk/pull/5981> (patch, third-party-advisory, web)
- <https://github.com/matrix-org/matrix-react-sdk> (package)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-32622> (advisory)
- <https://www.npmjs.com/package/matrix-react-sdk> (web)

## Sources

- CVE List: [CVE-2021-32622](https://www.cve.org/CVERecord?id=CVE-2021-32622), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-8796-gc9j-63rv](https://github.com/advisories/GHSA-8796-gc9j-63rv), CC-BY-4.0, modified 2026-07-08
- GitHub Advisory Database: [GHSA-cg57-p69r-3m7p](https://github.com/advisories/GHSA-cg57-p69r-3m7p), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-32622](https://nvd.nist.gov/vuln/detail/CVE-2021-32622), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-32622 · Whole record: https://cve.day/CVE-2021-32622.json · Rebuilt by cve.day 2026-11-25T22:58:01.449Z
