CVE-2021-40823
MEDIUM 5.9CVSS 3.1matrix-js-sdk can be tricked into disclosing E2EE room keys to a participating homeserver
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.
- Published
- 13 Sep 2021
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-200CWE-290CWE-327
- Also known as
- GHSA-23cm-x6j7-6hq3
- Sources
- NVDJSONOSV GHSA-23cm-x6j7-6hq3JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.3 | AV:N/AC:M/Au:N/C:P/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | matrix | javascript_sdkcpe:2.3:a:matrix:javascript_sdk:*:*:*:*:*:*:*:* |
< 12.4.1 | 12.4.1 |
| OSV | npm | matrix-js-sdk | < 12.4.1 | 12.4.1 |
References
- https://github.com/matrix-org/matrix-js-sdk/releases/tag/v12.4.1 · Third Party Advisory, WEB
- https://matrix.org/blog/2021/09/13/vulnerability-disclosure-key-sharing · Vendor Advisory, WEB
- https://github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-23cm-x6j7-6hq3 · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-40823 · ADVISORY
- https://github.com/matrix-org/matrix-js-sdk/commit/894c24880da0e1cc81818f51c0db80e3c9fb2be9 · WEB
- https://github.com/matrix-org/matrix-js-sdk · PACKAGE
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 13 Sep 2021)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 14 Sep 2021)