{"cve":"CVE-2021-40824","nvd":{"published":"2021-09-13T19:15:19.340","modified":"2026-06-17T04:07:29.053","status":"Modified","description":"A logic error in the room key sharing functionality of Element Android before 1.2.2 and matrix-android-sdk2 (aka Matrix SDK for Android) before 1.2.2 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 attacker to decrypt end-to-end encrypted messages sent by affected clients.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9},"cwes":["CWE-290"],"references":["https://github.com/matrix-org/matrix-android-sdk2/releases/tag/v1.2.2","https://matrix.org/blog/2021/09/13/vulnerability-disclosure-key-sharing","https://github.com/matrix-org/matrix-android-sdk2/releases/tag/v1.2.2","https://matrix.org/blog/2021/09/13/vulnerability-disclosure-key-sharing"],"products":["matrix:element","matrix:matrix-android-sdk2"],"source":"nvd","synced_at":"2026-10-19T21:23:41.316049955+00:00"},"epss":{"cve":"CVE-2021-40824","score":0.00662,"percentile":0.51681,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-jjmc-4p83-pp26","url":"https://osv.dev/vulnerability/GHSA-jjmc-4p83-pp26","summary":"Logic error in Matrix SDK for Android","modified":"2024-02-16T08:17:52.038768Z","packages":[{"ecosystem":"Maven","name":"org.matrix.android:matrix-android-sdk2","purl":"pkg:maven/org.matrix.android/matrix-android-sdk2","ranges":["<1.2.2"],"fixed":["1.2.2"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}