4.2medium
File upload local preview can run embedded scripts after user interaction
- Severity
- 4.2medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.37% (higher than 33% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-8796-gc9j-63rvGHSA-cg57-p69r-3m7p
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
| Product or package | Versions | Reported by |
|---|---|---|
| matrix-org matrix-react-sdk | < 3.21.0 | CVE List |
| matrix-react-sdk (npm) | before 3.21.0 | GitHub Advisory Database |
| matrix-react-sdk_project matrix-react-sdk | before 3.21.0 | NVD |
All scores
| GitHub_M | 4.2medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L |
| GitHub | 4.2medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L |
| NVD | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 4.4medium CVSS:2.0 | AV:L/AC:M/Au:N/C:P/I:P/A:P |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
Impact
When uploading a file, the local file preview can lead to execution of scripts embedded in the uploaded file, but only 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.
Patches
This has been fixed by https://github.com/matrix-org/matrix-react-sdk/pull/5981, which is included in 3.21.0.
Workarounds
There are no known workarounds.
NVD (es)
Matrix-React-SDK es un SDK basado en react para insertar un cliente de chat/voip de Matrix en una página web. Anterior a versión 3.21.0, al cargar un archivo, la vista previa del archivo local puede conllevar a una ejecución de scripts insertados en el archivo cargado. Esto solo puede ocurrir después de varias interacciones del usuario para abrir la vista previa en una pestaña separada. Esto solo afecta al usuario local durante el proceso de carga. No puede ser explotado remotamente o por otros usuarios. Esta vulnerabilidad está parcheada en la versión 3.21.0
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-32622 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8796-gc9j-63rv changed 2026-07-08 | CC-BY-4.0 |
| GitHub Advisory Database | GHSA-cg57-p69r-3m7p changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-32622 changed 2026-06-17 | Public domain |