CVE-2021-32622: Improper file handling in matrix-react-sdk

matrix-react-sdk Updated 02 Oct 2025

Summary

10/02/2022
Yes i
Moderate
4.2

CVE-2021-32622: Improper file handling in matrix-react-sdk. Affects matrix-react-sdk versions < 3.21.0. Fixed in 3.21.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Matrix-React-SDK is a react-based SDK for inserting a Matrix chat/voip client into a web page. It provides the functionality to upload files, allowing users to preview and interact with the uploaded files. However, prior to version 3.21.0, there was a vulnerability in the file handling process that could lead to the execution of scripts embedded in the uploaded file. This vulnerability could only be exploited by the local user while in the process of uploading and required several user interactions to open the preview in a separate tab. It could not be exploited remotely or by other users.

Vulnerability Detail

The vulnerability in matrix-react-sdk allowed for the execution of scripts embedded in uploaded files during the local file preview. This means that if a user uploaded a file containing malicious scripts and opened the preview in a separate tab, those scripts could be executed. However, it's important to note that this vulnerability only impacted the local user during the uploading process and could not be exploited remotely or by other users. The vulnerability has been patched in version 3.21.0 of matrix-react-sdk.

How To Fix

Minimum fixed version

3.21.0

This is the first release that contains the fix.

npm install matrix-react-sdk@3.21.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

In conclusion, the vulnerability in matrix-react-sdk allowed for the execution of scripts embedded in uploaded files during the local file preview. However, this vulnerability could only be exploited by the local user during the uploading process and has been patched in version 3.21.0. It cannot be exploited remotely or by other users. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for matrix-react-sdk →

Share this vulnerability

FAQ

No, this vulnerability can only be exploited by the local user during the uploading process.

No, this vulnerability only impacts the local user and cannot be exploited by other users.

The impact of this vulnerability is limited to the local user's system during the uploading process. It cannot be exploited remotely or by other users.

Yes, this vulnerability has been patched in version 3.21.0 of matrix-react-sdk.

To protect yourself from this vulnerability, it is recommended to upgrade to version 3.21.0 or later of matrix-react-sdk.

Related vulnerabilities

Recent vulnerabilities recorded for matrix-react-sdk.

How To Fix

Minimum fixed version

3.21.0

This is the first release that contains the fix.

npm install matrix-react-sdk@3.21.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback