CVE-2024-40648 matrix-sdk-crypto's `UserIdentity::is_verified` not checking verification status of own user identity while performing the check
A malicious homeserver can manipulate identity verification status, causing the SDK to incorrectly trust unverified users during sensitive operations.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-40648?
CVE-2024-40648 is a medium-severity authentication bypass vulnerability in matrix-org matrix-rust-sdk, published on 18 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
matrix-rust-sdk is an implementation of a Matrix client-server library in Rust. The `UserIdentity::is_verified()` method in the matrix-sdk-crypto crate before version 0.7.2 doesn't take into account the verification status of the user's own identity while performing the check and may as a result return a value contrary to what is implied by its name and documentation. If the method is used to decide whether to perform sensitive operations towards a user identity, a malicious homeserver could manipulate the outcome in order to make the identity appear trusted. This is not a typical usage of the method, which lowers the impact. The method itself is not used inside the `matrix-sdk-crypto` crate. The 0.7.2 release of the `matrix-sdk-crypto` crate includes a fix. All users are advised to upgrade. There are no known workarounds for this vulnerability.
Weakness: CWE-287
Which versions are affected by CVE-2024-40648?
3 open source packages ship an affected version, including matrix-sdk-crypto.
| Package | Affected | Fixed in |
|---|---|---|
matrix-sdk-crypto crates.io | All versions | 0.7.2 |
matrix-sdk-crypto crates.io | All versions | 0.7.2 |
matrix-sdk-crypto crates.io | From 0.0.0-0 | 0.7.2 |
Linux distribution packages (1)
cargo-audit-advisory-db openSUSE:Tumbleweed | All versions | 20240730-1.1 |
How do I fix CVE-2024-40648?
Upgrade matrix-sdk-crypto to 0.7.2 or later.
Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.
Is CVE-2024-40648 being exploited?
There is no known exploitation of CVE-2024-40648 in the wild and no public exploit code.
Sources
Also known as GHSA-4qg4-cvh2-crgg, RUSTSEC-2024-0356, openSUSE-SU-2024:14224-1.