CVE-2021-40824: A logic error in the room key sharing functionality of Element Android before 1.2.2 and matrix-android-sdk2 (a
CVE-2021-40824 is a medium-severity flaw (CVSS 5.9) affecting element, matrix-android-sdk2. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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 c
Why this priority
- Remotely exploitable, no login, no user action
A fixed release or distro patch exists.
Risk facts
| CVSS score | 5.9 (Medium) |
| Attack vector | Network (remote) |
| Attack complexity | High |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 0.7% (top 48%) |
| CISA exploited list | No |
| Weakness | CWE-290 |
| Published | 2021-09-13 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2021-40824?
element: upgrade to 1.2.2; matrix-android-sdk2: upgrade to 1.2.2. Exact commands for each OS are on this page.
Is CVE-2021-40824 being exploited?
CVE-2021-40824 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2021-40824 affect?
CVE-2021-40824 affects element, matrix-android-sdk2. Severity is medium (CVSS 5.9). 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
How urgent is CVE-2021-40824?
Priority 39/100. Remotely exploitable, no login, no user action
Software pages
Related CVEs
- CVE-2025-27606 MEDIUM 5.1 UPGRADE Element Android is an Android Matrix Client provided by Element
- CVE-2024-26132 MEDIUM 4.0 UPGRADE Element Android is an Android Matrix Client
- CVE-2024-26131 HIGH 8.4 UPGRADE Element Android is an Android Matrix Client
- CVE-2022-41904 MEDIUM 6.4 UPGRADE Element iOS is an iOS Matrix client provided by Element
- CVE-2021-44538 CRITICAL 9.8 UPGRADE UPGRADE The olm_session_describe function in Matrix libolm before 3.2.7 is vulnerable to a buffer overflow