Skip to content
Fencer Intel
medium 5.9

CVE-2021-40824 json

Logic error in Matrix SDK for Android

published 5y ago modified 4mo ago also GHSA-jjmc-4p83-pp26 , EUVD-2022-4389

cvss
5.9
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
0.7%
EPSS 0.7% chance of exploitation in 30 days, percentile 51%
public exploits
0
none known

Summary

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.

Patch / fix

  • maven org.matrix.android:matrix-android-sdk2 1.2.2
  • matrix element 1.2.2
  • matrix matrix-android-sdk2 1.2.2
  • riot-web Alpine 3.17, Alpine 3.16, Alpine 3.15 +1 more 1.8.4-r0
  • element-web Alpine 3.24, Alpine 3.23, Alpine 3.22 +4 more 1.8.4-r0

alpine advisories ALPINE-CVE-2021-40824

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Is CVE-2021-40824 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Exploit prediction

0.66% chance of exploitation in the next 30 days, higher than 51% of all scored CVEs (FIRST EPSS, 2026-11-09).

CVSS scores

assigned by version score vector
NVD 3.1 5.9 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
NVD 2.0 4.3 AV:N/AC:M/Au:N/C:P/I:N/A:N
GitHub 3.1 5.9 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected packages

ecosystem package affected fixed in
maven org.matrix.android:matrix-android-sdk2
<1.2.2
1.2.2

Classification

Weakness
  • CWE-290 Authentication Bypass by Spoofing
  • CWE-327 Use of a Broken or Risky Cryptographic Algorithm

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.