CVE-2021-40823 json
matrix-js-sdk can be tricked into disclosing E2EE room keys to a participating homeserver
published 5y ago modified 4mo ago also GHSA-23cm-x6j7-6hq3 , EUVD-2021-1944
- cvss
- 5.9
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.7%
- EPSS 0.7% chance of exploitation in 30 days, percentile 51%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm matrix-js-sdk 12.4.1
- matrix javascript_sdk 12.4.1
- riot-web Alpine 3.17, Alpine 3.16, Alpine 3.15 +1 more 1.8.4-r0
- element-web Alpine 3.24, Alpine 3.23, Alpine 3.22 +4 more 1.8.4-r0
alpine advisories ALPINE-CVE-2021-40823
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- element-desktop Arch Linux 1.8.4-1
- element-web Arch Linux 1.8.4-1
arch linux advisories AVG-2377
Is CVE-2021-40823 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerExploit prediction
0.66% chance of exploitation in the next 30 days, higher than 51% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:P/I:N/A:N |
| GitHub | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | matrix-js-sdk | <12.4.1 |
12.4.1 |
Classification
References
-
github.com
/matrix-org/matrix-js-sdk/commit/894c24880da0e1cc81818f51c0db80e3c9fb2be9
web
-
matrix.org
/blog/2021/09/13/vulnerability-disclosure-key-sharing
web, vendor-advisory
-
github.com
/matrix-org/matrix-js-sdk/releases/tag/v12.4.1
web, third-party-advisory
-
github.com
/matrix-org/matrix-js-sdk/security/advisories/GHSA-23cm-x6j7-6hq3
web
-
nvd.nist.gov
/vuln/detail/CVE-2021-40823
advisory
-
github.com
/matrix-org/matrix-js-sdk
package
Sources
- CVE List CVE-2021-40823
- GitHub Advisory GHSA-23cm-x6j7-6hq3
- NVD CVE-2021-40823
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.