{"id":"CVE-2022-39246","published":"2022-09-28T20:00:19Z","modified":"2025-04-23T16:54:47Z","title":"matrix-android-sdk2 vulnerable to impersonation via forwarded Megolm sessions","vendor":"matrix-org","product":"matrix-android-sdk2","tier":"tail","description":{"text":"matrix-android-sdk2 is the Matrix SDK for Android. Prior to version 1.5.1, an attacker cooperating with a malicious homeserver can construct messages appearing to have come from another person. Such messages will be marked with a grey shield on some platforms, but this may be missing in others. This attack is possible due to the key forwarding strategy implemented in the matrix-android-sdk2 that is too permissive. Starting with version 1.5.1, the default policy for accepting key forwards has been made more strict in the matrix-android-sdk2. The matrix-android-sdk2 will now only accept forwarded keys in response to previously issued requests and only from own, verified devices. The SDK now sets a `trusted` flag on the decrypted message upon decryption, based on whether the key used to decrypt the message was received from a trusted source. Clients need to ensure that messages decrypted with a key with `trusted = false` are decorated appropriately (for example, by showing a warning for such messages). As a workaroubnd, current users of the SDK can disable key forwarding in their forks using `CryptoService#enableKeyGossiping(enable: Boolean)`.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00885,"percentile":0.60148,"provenance":"source"},"cwes":[{"id":"CWE-322","name":"Key Exchange without Entity Authentication"},{"id":"CWE-287","name":"Improper Authentication"}],"references":[{"url":"https://github.com/matrix-org/matrix-spec-proposals/pull/3061","tags":["x_refsource_MISC"]},{"url":"https://github.com/matrix-org/matrix-android-sdk2/security/advisories/GHSA-2pvj-p485-cp3m","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/matrix-org/matrix-android-sdk2/commit/77df720a238d17308deab83ecaa37f7a4740a17e","tags":["x_refsource_MISC"]},{"url":"https://github.com/matrix-org/matrix-android-sdk2/releases/tag/v1.5.1","tags":["x_refsource_MISC"]}],"priority":{"score":17.3,"factors":[{"name":"EPSS percentile","points":12.03},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"matrix-org","affectedVersions":[{"vendor":"matrix-org","product":"matrix-android-sdk2","versions":["< 1.5.1"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2025-04-23T15:50:49.774935Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Maven","package":"org.matrix.android:matrix-android-sdk2","vulnerableRanges":["<1.5.1"],"patched":["1.5.1"],"from":["GHSA-2pvj-p485-cp3m"],"provenance":"source"}],"summary":{"text":"The matrix-android-sdk2 Matrix SDK for Android contains a flaw in its Megolm key forwarding logic, which accepts forwarded keys too permissively before version 1.5.1. An attacker cooperating with a malicious homeserver can craft messages that appear to come from another user, and the attack requires no authentication or user interaction, though on some clients the missing grey shield indicator may fail to flag these messages as untrusted.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:50:01Z"},"euvd":{"id":"EUVD-2022-6668","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2021-40824","published":"2021-09-13","fixed":"1.2.2","kev":false,"link":{"from":"CVE-2021-40824","to":"CVE-2022-39246","relation":"successor","confidence":"medium","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Maven:org.matrix.android:matrix-android-sdk2","fromFixed":"1.2.2","toFixed":"1.5.1","daysApart":380},{"kind":"similar","provenance":"machine","score":0.38,"basis":"same package + description similarity"}]}},{"cve":"CVE-2022-39246","published":"2022-09-28","fixed":"1.5.1","kev":false},{"cve":"CVE-2022-39248","published":"2022-09-28","fixed":"1.5.1","kev":false}],"package":"Maven:org.matrix.android:matrix-android-sdk2"}}