CVE-2021-40823Matrix Javascript Sdk
Medium 5.9 No auth needed
Follow: this CVE · Matrix · Matrix Javascript Sdk We alert you by email or Slack (account required).
- Priority
- 50
- CVSS 3.1
- 5.9
- EPSS
- 0.7% probability of exploitation in 30 days · percentile 47
- Auth required
- No
- Published
- Sep 13, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-290
- Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
What happens
A logic error in the room key sharing functionality of matrix-js-sdk (aka Matrix Javascript SDK) before 12.4.1 allows a malicious Matrix homeserver present in an encrypted room to steal room encryption keys (via crafted Matrix protocol messages) that were originally sent by affected Matrix clients participating in that room. This allows the homeserver to decrypt end-to-end encrypted messages sent by affected clients.
What to do
- Apply the vendor's security update for Javascript Sdk.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | matrix-js-sdk |
< 12.4.1 |
12.4.1 |
npm install matrix-js-sdk@12.4.1 |
Per OSV / GitHub Advisories (GHSA-23cm-x6j7-6hq3). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| matrix | javascript_sdk | < 12.4.1 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Third Party Advisory
- matrix.org Vendor Advisory