CVE-2022-39252 matrix-sdk-crypto contains potential impersonation via room key forward responses

High 8.6 Published Updated

Attackers can impersonate users by inserting invalid room keys because the SDK fails to verify the source of forwarded keys.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-39252?

CVE-2022-39252 is a high-severity authentication bypass vulnerability in matrix-org matrix-rust-sdk, published on 29 Sep 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-322, CWE-287

Which versions are affected by CVE-2022-39252?

3 open source packages ship an affected version, including matrix-sdk-crypto. It affects 1 product.

PackageAffectedFixed in
matrix-sdk-crypto crates.ioAll versions0.6.0
matrix-sdk-crypto crates.ioAll versions0.6.0
matrix-sdk-crypto crates.ioFrom 0.0.0-00.6.0

Products include Matrix Matrix-Rust-Sdk.

How do I fix CVE-2022-39252?

Upgrade matrix-sdk-crypto to 0.6.0 or later.

Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.

Is CVE-2022-39252 being exploited?

There is no known exploitation of CVE-2022-39252 in the wild and no public exploit code.

Sources

Also known as GHSA-vp68-2wrm-69qm, RUSTSEC-2022-0085.

Is CVE-2022-39252 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free