File Upload Local Preview Script Execution in matrix-react-sdk

matrix-react-sdk Updated 02 Oct 2025

Summary

17/05/2021
MODERATE
Yes i
Moderate
4.2

GHSA-8796-gc9j-63rv: File upload local preview can run embedded scripts after user interaction. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

matrix-react-sdk is an npm package that provides a React-based SDK for building Matrix clients. It allows developers to create applications that interact with the Matrix communication protocol. The package includes features such as file uploading, which enables users to upload files to the Matrix server. However, a vulnerability has been discovered in the local file preview functionality of matrix-react-sdk.

Vulnerability Detail

The vulnerability in matrix-react-sdk allows for the execution of embedded scripts in uploaded files during the local file preview. However, this can only occur after several user interactions to open the preview in a separate tab. It is important to note that this vulnerability only affects the local user during the file upload process and cannot be exploited remotely or by other users. The impact of this vulnerability is considered moderate, with a CVSS score of 4.2. The vulnerability is classified under CWE-74, which relates to improper neutralization of input during web page generation.

How To Fix

Latest published version: 3.114.0 as of 23 Oct 2026

npm install matrix-react-sdk@3.114.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

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 →

Workaround

There are no known workarounds for this vulnerability. It is recommended to apply the fix by updating to version 3.21.0 of matrix-react-sdk.

Conclusion

In conclusion, the vulnerability in matrix-react-sdk allows for the execution of embedded scripts in uploaded files during the local file preview. However, this vulnerability can only be exploited by the local user during the file upload process and has a moderate impact. It is recommended to update to version 3.21.0 of matrix-react-sdk to address this vulnerability. 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 file upload process.

The impact is considered moderate, with a CVSS score of 4.2. It allows for the execution of embedded scripts in uploaded files during the local file preview.

No, this vulnerability only affects the local user who is uploading the file.

This vulnerability is classified under CWE-74, which relates to improper neutralization of input during web page generation.

Yes, the vulnerability has been fixed in version 3.21.0 of matrix-react-sdk.

Related vulnerabilities

Recent vulnerabilities recorded for matrix-react-sdk.

How To Fix

Latest published version: 3.114.0 as of 23 Oct 2026

npm install matrix-react-sdk@3.114.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

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