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.
Cite this page
CVE-2021-40824. CVEDatabase.com. Retrieved 1 May 2026. https://cvedatabase.com/cve/CVE-2021-40824
Use CWE-290, Matrix vendor hub and Element product page to widen CVE-2021-40824 into its surrounding weakness, vendor, and product context.
Compare it with CVE-2021-44538 for nearby disclosures in the same product family.