CVE-2021-40824
| Affected software | 2 products, listed below |
|---|---|
| Severity | 5.9 Medium CVSS 3.1 2 scores |
| Fixed in | 1.2.2 |
| Weakness | CWE-290 |
| Published | 13 Sep 2021 |
| Updated | 13 Oct 2026 |
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.
CWE-327
Exploitation status
No public exploit
No exploit has been reported in the sources we check. Published 5 years ago.
Exploitation status
- CISA KEV not listed
- VulnCheck KEV not listed
- CISA Vulnrichment no assessment published
- Indexed PoC none indexed
- EPSS 0.66% chance in 30 days
Waratek protection
A Java vulnerability, but not one Waratek protects. It affects only Java on a user's desktop (applets, Web Start, JavaFX, the installer), sits in a product the Waratek agent can't be installed into, or is in a package we don't expect in business applications. The decision below says which.
- Protection none
- Action not pursued none
- Review human Researcher
- Record active
| Decided by | A researcher's recorded decision for this specific CVE |
|---|---|
| Finding | A researcher set this CVE's status to Outside Waratek scope. |
Waratek research note
written 2026-11-13Written by a Waratek engineer who reviewed this CVE. Their decision sets the status above, ahead of every automated rule except a withdrawal.
Comments
matrix-android-sdk2 (Element Android) is an Android library. It runs inside a phone app, not in a server JVM, so there is no start-up line to add -javaagent to. In scope only because it is published to Maven Central.
CVSS
5.9 MEDIUM
v3.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
2 metrics
CVSS
5.9 MEDIUM v3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
2 metrics
We show the highest score from the newest CVSS version. Scores from different versions can't be compared, and the first score listed is sometimes a 0.0 placeholder.
| Version | Score | Band | Vector | Assigner | Type | |
|---|---|---|---|---|---|---|
| CVSS 3.1 | 5.9 | MEDIUM | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
NVD | Primary | published |
| CVSS 2.0 | 4.3 | none | AV:N/AC:M/Au:N/C:P/I:N/A:N |
NVD | Primary |
Affected software and releases
Maven packages
Affected and fixed versions, from OSV.dev| Package | Introduced | Fixed | Last affected |
|---|---|---|---|
org.matrix.android:matrix-android-sdk2 |
0 | 1.2.2 |
unbounded |
Products and versions
3 products, 3 version entries| Source | Vendor | Product | Scheme | Affected versions |
|---|---|---|---|---|
| nvd | matrix | element | generic | < 1.2.2 |
| nvd | matrix | matrix-android-sdk2 | generic | < 1.2.2 |
| osv | org.matrix.android | matrix-android-sdk2 | generic | < 1.2.2 |
References
| URL | Tags |
|---|---|
| https://github.com/matrix-org/matrix-android-sdk2/releases/tag/v1.2.2 | WEB |
| https://matrix.org/blog/2021/09/13/vulnerability-disclosure-key-sharing | WEB |
Timeline
Timeline
| Published | 2021-09-13 | By the CVE Program. |
|---|---|---|
| NVD record modified | 2026-06-17 | NVD's own last-modified date for this record. |
| Last VRT activity | 2026-10-13 | Most recent commit touching this CVE's classification, patch or rule file. |
| Classification created | 2026-11-13 | First commit adding this CVE's research note. |