CVE-2021-21320 is a medium-severity (CVSS 4.3) CWE-345 vulnerability in matrix-react-sdk. A fix is available for matrix-react-sdk — see the affected versions and patch details below.
User content sandbox can be confused into opening arbitrary documents
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
matrix-react-sdknpmDescription
Impact
The user content sandbox can be abused to trick users into opening unexpected documents after several user interactions. The content can be opened with a blob origin from the Matrix client, so it is possible for a malicious document to access user messages and secrets.
Patches
This has been fixed by https://github.com/matrix-org/matrix-react-sdk/pull/5657, which is included in 3.15.0.
Workarounds
There are no known workarounds.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | matrix-react-sdk | all versions | 3.15.0npm install matrix-react-sdk@3.15.0 |
Affected Products
matrix-react-sdkmatrix-react-sdk_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for matrix-react-sdk, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update matrix-react-sdk to 3.15.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-21320 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is CVE-2021-21320 in your dependencies?
Find it across npm, including transitive dependencies.