CVE-2021-40823
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
Fixed builds are available from Alpine, npm: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | node-matrix-js-sdk | Under investigation | UBUNTU-CVE-2021-40823 | |
| Ubuntu 22.04 | node-matrix-js-sdk | Under investigation | UBUNTU-CVE-2021-40823 | |
| Ubuntu 20.04 | node-matrix-js-sdk | Fix pending | UBUNTU-CVE-2021-40823 | |
| Alpine Linux 3.24 | element-web | Fixed | 1.8.4-r0 | ALPINE-CVE-2021-40823 |
| Alpine Linux 3.23 | element-web | Fixed | 1.8.4-r0 | ALPINE-CVE-2021-40823 |
| Alpine Linux 3.22 | element-web | Fixed | 1.8.4-r0 | ALPINE-CVE-2021-40823 |
| Alpine Linux 3.21 | element-web | Fixed | 1.8.4-r0 | ALPINE-CVE-2021-40823 |
| Alpine Linux 3.20 | element-web | Fixed | 1.8.4-r0 | ALPINE-CVE-2021-40823 |
| Alpine Linux 3.19 | element-web | Fixed | 1.8.4-r0 | ALPINE-CVE-2021-40823 |
| Alpine Linux 3.18 | element-web | Fixed | 1.8.4-r0 | ALPINE-CVE-2021-40823 |
| Alpine Linux 3.17 | riot-web | Fixed | 1.8.4-r0 | ALPINE-CVE-2021-40823 |
| Alpine Linux 3.16 | riot-web | Fixed | 1.8.4-r0 | ALPINE-CVE-2021-40823 |
| Alpine Linux 3.15 | riot-web | Fixed | 1.8.4-r0 | ALPINE-CVE-2021-40823 |
| Alpine Linux 3.14 | riot-web | Fixed | 1.8.4-r0 | ALPINE-CVE-2021-40823 |
| npm library | matrix-js-sdk | Fixed | 12.4.1 | GHSA-23cm-x6j7-6hq3 |
References
- https://github.com/matrix-org/matrix-js-sdk/releases/tag/v12.4.1
- https://matrix.org/blog/2021/09/13/vulnerability-disclosure-key-sharing
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.