CVE-2021-32622
JSON

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 packageVersionsReported by
matrix-org matrix-react-sdk< 3.21.0CVE List
matrix-react-sdk (npm)before 3.21.0GitHub Advisory Database
matrix-react-sdk_project matrix-react-sdkbefore 3.21.0NVD

All scores

GitHub_M4.2medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L
GitHub4.2medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:L
NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD4.4medium CVSS:2.0AV: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.&#xa0;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.&#xa0;Esto solo puede ocurrir después de varias interacciones del usuario para abrir la vista previa en una pestaña separada.&#xa0;Esto solo afecta al usuario local durante el proceso de carga.&#xa0;No puede ser explotado remotamente o por otros usuarios.&#xa0;Esta vulnerabilidad está parcheada en la versión 3.21.0

References

Sources

SourceRecordLicence
CVE ListCVE-2021-32622 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-8796-gc9j-63rv changed 2026-07-08CC-BY-4.0
GitHub Advisory DatabaseGHSA-cg57-p69r-3m7p changed 2026-07-08CC-BY-4.0
NVDCVE-2021-32622 changed 2026-06-17Public domain