# CVE-2021-40824

- Priority: **Routine**
- Reason: Not severe (CVSS 5.9, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2021-09-13 · Modified: 2024-08-04
- Aliases: GHSA-jjmc-4p83-pp26, ALPINE-CVE-2021-40824
- Record: https://cvemate.com/vulnerability/CVE-2021-40824 · JSON: https://cvemate.com/vulnerability/CVE-2021-40824/json

## Description

```text
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.
```

## Signals

- CVSS: 5.9 medium (v3.1, NVD) CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- EPSS: 0.662%, percentile 53.067%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine element-web (Alpine Linux): \< 1.8.4-r0
- alpine riot-web (Alpine Linux): \< 1.8.4-r0
- matrix element: \< 1.2.2
- matrix matrix-android-sdk2: \< 1.2.2
- org.matrix.android matrix-android-sdk2 (Maven): \< 1.2.2

## References

- <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://nvd.nist.gov/vuln/detail/CVE-2021-40824>
- <https://security.alpinelinux.org/vuln/CVE-2021-40824>

---

Data as of 2026-12-05T05:21:43.781Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
