{"id":"CVE-2021-40823","published":"2021-09-13T18:45:50Z","modified":"2024-08-04T02:51:06Z","title":"A logic error in the room key sharing functionality of matrix-js-sdk (aka Matrix Javascript SDK) before 12.4.1 allows…","vendor":null,"product":null,"tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00662,"percentile":0.46544,"provenance":"source"},"cwes":[],"references":[{"url":"https://github.com/matrix-org/matrix-js-sdk/releases/tag/v12.4.1","tags":["x_refsource_MISC"]},{"url":"https://matrix.org/blog/2021/09/13/vulnerability-disclosure-key-sharing","tags":["x_refsource_MISC"]}],"priority":{"score":9.3,"factors":[{"name":"EPSS percentile","points":9.31}]},"affected":[{"ecosystem":"npm","package":"matrix-js-sdk","vulnerableRanges":["<12.4.1"],"patched":["12.4.1"],"from":["GHSA-23cm-x6j7-6hq3"],"provenance":"source"}],"summary":{"text":"A logic error in the room key sharing functionality of matrix-js-sdk (the Matrix JavaScript SDK) before version 12.4.1 lets a malicious Matrix homeserver steal room encryption keys originally sent by affected clients. The attacker must operate a homeserver present in an encrypted room, and it uses crafted Matrix protocol messages to obtain those keys and decrypt end-to-end encrypted messages from affected clients.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:10:16Z"},"euvd":{"id":"EUVD-2021-1944","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-matrix-org-matrix-js-sdk-cve-2021-40823","children":[{"from":"CVE-2021-40823","to":"CVE-2022-39236","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/crypto/algorithms/megolm.ts"],"commits":["https://github.com/matrix-org/matrix-js-sdk/commit/894c24880da0e1cc81818f51c0db80e3c9fb2be9","https://github.com/matrix-org/matrix-js-sdk/commit/a587d7c36026fe1fcf93dfff63588abee359be76"],"basis":"shared function","functions":["MegolmEncryption"]}]},{"from":"CVE-2021-40823","to":"CVE-2022-39249","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/crypto/algorithms/megolm.ts"],"commits":["https://github.com/matrix-org/matrix-js-sdk/commit/894c24880da0e1cc81818f51c0db80e3c9fb2be9","https://github.com/matrix-org/matrix-js-sdk/commit/a587d7c36026fe1fcf93dfff63588abee359be76"],"basis":"shared function","functions":["MegolmEncryption"]}]},{"from":"CVE-2021-40823","to":"CVE-2022-39250","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/crypto/algorithms/megolm.ts"],"commits":["https://github.com/matrix-org/matrix-js-sdk/commit/894c24880da0e1cc81818f51c0db80e3c9fb2be9","https://github.com/matrix-org/matrix-js-sdk/commit/a587d7c36026fe1fcf93dfff63588abee359be76"],"basis":"shared function","functions":["MegolmEncryption"]}]},{"from":"CVE-2021-40823","to":"CVE-2022-39251","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/crypto/algorithms/megolm.ts"],"commits":["https://github.com/matrix-org/matrix-js-sdk/commit/894c24880da0e1cc81818f51c0db80e3c9fb2be9","https://github.com/matrix-org/matrix-js-sdk/commit/a587d7c36026fe1fcf93dfff63588abee359be76"],"basis":"shared function","functions":["MegolmEncryption"]}]}]}}