CVE-2021-40824Matrix Element
Medium 5.9 No auth needed
Follow: this CVE · Matrix · Matrix Element We alert you by email or Slack (account required).
- Priority
- 50
- CVSS 3.1
- 5.9
- EPSS
- 0.7% probability of exploitation in 30 days · percentile 47
- Auth required
- No
- Published
- Sep 13, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-290
- Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
What happens
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.
What to do
- Apply the vendor's security update for Element.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Maven | org.matrix.android:matrix-android-sdk2 |
< 1.2.2 |
1.2.2 |
— |
Per OSV / GitHub Advisories (GHSA-jjmc-4p83-pp26). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| matrix | element | < 1.2.2 |
| matrix | matrix-android-sdk2 | < 1.2.2 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- matrix.org Vendor Advisory