CVE-2022-39257 Matrix iOS SDK vulnerable to impersonation via forwarded Megolm sessions
Attackers can impersonate users by exploiting permissive key forwarding, requiring a malicious homeserver and attacker coordination.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2022-39257?
CVE-2022-39257 is a high-severity authentication bypass vulnerability in matrix-org matrix-ios-sdk, published on 28 Sep 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Matrix iOS SDK allows developers to build iOS apps compatible with Matrix. Prior to version 0.23.19, 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 matrix-ios-sdk implementing a too permissive key forwarding strategy. The default policy for accepting key forwards has been made more strict in the matrix-ios-sdk version 0.23.19. matrix-ios-sdk 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). This attack requires coordination between a malicious home server and an attacker, so those who trust their home servers do not need a workaround.
Which versions are affected by CVE-2022-39257?
It affects 1 product.
Products include Matrix Software Development Kit.
How do I fix CVE-2022-39257?
No fix has been published for CVE-2022-39257 yet. Limit exposure of the affected software until one is available.
Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.
Is CVE-2022-39257 being exploited?
There is no known exploitation of CVE-2022-39257 in the wild and no public exploit code.
Other vulnerabilities in matrix-org matrix-ios-sdk
Sources
Also known as GHSA-qxr3-5jmq-xcf4.