What’s Vulnerable › Vulnerabilities
CVE-2021-40824
- Severity: medium (CVSS 5.9 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.7% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-09-13 · updated 2026-06-17
- Weakness: CWE-290
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.
Affected products
- Matrix Element: before 1.2.2 — fixed in 1.2.2
- matrix-org matrix-android-sdk2: before 1.2.2 — fixed in 1.2.2
How to fix
Upgrade to a fixed version: Matrix Element 1.2.2; matrix-org matrix-android-sdk2 1.2.2. Check the vendor advisory for mitigations.
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
Get alerted when CVE-2021-40824 or the next vulnerability affects your stack