CVE-2021-21320: User content sandbox can be confused into opening arbitrary documents in matrix-react-sdk
Summary
CVE-2021-21320: User content sandbox can be confused into opening arbitrary documents. Affects matrix-react-sdk versions < 3.15.0. Fixed in 3.15.0. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
matrix-react-sdk is an npm package that provides a user interface for the Matrix client. It allows users to interact with the Matrix protocol and access messaging features. The package is vulnerable to a security issue that can be exploited to deceive users into opening unexpected documents. This vulnerability can be abused to gain unauthorized access to user messages and secrets by tricking them into interacting with malicious content.
Vulnerability Detail
The user content sandbox in matrix-react-sdk can be manipulated to trick users into opening arbitrary documents. This can be achieved through a series of user interactions that confuse the sandbox. The content can be opened with a blob origin from the Matrix client, enabling a malicious document to access user messages and secrets. The impact of this vulnerability is considered low.
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.15.0
This is the first release that contains the fix.
npm install matrix-react-sdk@3.15.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.
Conclusion
In conclusion, the matrix-react-sdk package is vulnerable to a security issue that can be exploited to deceive users into opening arbitrary documents. This can lead to unauthorized access to user messages and secrets. It is recommended to update to version 3.15.0 or later to fix this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for matrix-react-sdk →
FAQ
matrix-react-sdk is an npm package that provides a user interface for the Matrix client, allowing users to interact with the Matrix protocol and access messaging features.
The vulnerability allows malicious documents to access user messages and secrets by tricking users into opening unexpected documents.
To fix this vulnerability, update matrix-react-sdk to version 3.15.0 or later.
No, there are no known workarounds for this vulnerability.
The severity of this vulnerability is considered low, with a CVSS score of 2.6.
References
Related vulnerabilities
Recent vulnerabilities recorded for matrix-react-sdk.