Skip to content

Element Android can be tricked into disclosing E2EE room keys to a participating homeserver

Critical
dkasak published GHSA-p2m5-74vh-pj57 Sep 14, 2021

Package

matrix-android-sdk2 (jitpack.io)

Affected versions

1.2.1

Patched versions

>1.2.1

Description

Impact

A logic error in the room key sharing functionality of Element Android (and matrix-android-sdk2) before 1.2.2 allows a malicious Matrix homeserver† participating in an encrypted room to steal room encryption keys from affected Element Android devices participating in that room. This allows the attacker to decrypt end-to-end encrypted messages previously sent by those Element Android devices.

† Or anyone with access to the account of the original recipient of an encrypted message.

Patch

This was fixed in 3a0734f.

Workarounds

To prevent a homeserver from being able to steal the room keys, vulnerable clients can be taken offline or signed out. If signing out, care should be taken to either set up Secure Backup or export E2E room keys in order to preserve access to past messages.

References

Disclosure: https://matrix.org/blog/2021/09/13/vulnerability-disclosure-key-sharing

For more information

If you have any questions or comments about this advisory, e-mail us at security@matrix.org.

Severity

Critical

CVE ID

CVE-2021-40824

Weaknesses

Credits