{"id":"CVE-2022-39252","summary":"When matrix-rust-sdk recieves forwarded room keys, the reciever doesn't check if it requested the key from the forwarder","details":"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.","aliases":["GHSA-vp68-2wrm-69qm","RUSTSEC-2022-0085"],"modified":"2026-10-30T02:45:34.269468022Z","published":"2022-09-29T14:15:14Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-287","CWE-322"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/39xxx/CVE-2022-39252.json"},"references":[{"type":"WEB","url":"https://github.com/matrix-org/matrix-rust-sdk/releases/tag/matrix-sdk-0.6.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/39xxx/CVE-2022-39252.json"},{"type":"ADVISORY","url":"https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-vp68-2wrm-69qm"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39252"},{"type":"FIX","url":"https://github.com/matrix-org/matrix-rust-sdk/commit/093fb5d0aa21c0b5eaea6ec96b477f1075271cbb"},{"type":"FIX","url":"https://github.com/matrix-org/matrix-rust-sdk/commit/41449d2cc360e347f5d4e1c154ec1e3185f11acd"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/matrix-org/matrix-rust-sdk","events":[{"introduced":"0"},{"fixed":"82436b57bac6b9322deef75ddd6c2fd91c6083db"},{"fixed":"093fb5d0aa21c0b5eaea6ec96b477f1075271cbb"},{"fixed":"41449d2cc360e347f5d4e1c154ec1e3185f11acd"}],"database_specific":{"extracted_events":[{"source":"CPE_RANGE","cpe":"cpe:2.3:a:matrix:matrix-rust-sdk:*:*:*:*:*:*:*:*","range":[{"introduced":"0"},{"fixed":"0.6"}]},{"range":[{"fixed":"093fb5d0aa21c0b5eaea6ec96b477f1075271cbb"}],"source":"REFERENCES_COMMIT"},{"range":[{"fixed":"41449d2cc360e347f5d4e1c154ec1e3185f11acd"}],"source":"REFERENCES_COMMIT"},{"original_tag":"matrix-sdk-0.6.0","range":[{"fixed":"82436b57bac6b9322deef75ddd6c2fd91c6083db"}],"source":"REFERENCES_TAG"}]}}],"versions":["matrix-sdk-crypto-ffi-0.1.0","ruma-appservice-api-0.5.0","ruma-push-gateway-api-0.4.0","ruma-federation-api-0.4.0","ruma-identity-service-api-0.4.0","ruma-client-api-0.13.0","ruma-signatures-0.10.0","ruma-api-0.20.0","ruma-events-0.26.0","ruma-common-0.8.0","ruma-identifiers-0.22.0","ruma-state-res-0.5.0","ruma-api-0.19.0","ruma-events-0.25.0","ruma-common-0.7.0","ruma-identifiers-0.21.0","ruma-serde-0.6.0","ruma-api-0.18.5","ruma-api-0.18.4","ruma-events-0.24.5","matrix-sdk-crypto-0.4.1","matrix-sdk-common-0.4.1","matrix-sdk-base-0.4.1","matrix-sdk-0.4.1","matrix-sdk-0.4.0","ruma-state-res-0.4.1","matrix-sdk-crypto-0.4.0","matrix-sdk-base-0.4.0","matrix-qrcode-0.2.0","matrix-sdk-test-0.4.0","matrix-sdk-common-0.4.0","ruma-federation-api-0.3.1","ruma-0.4.0","ruma-state-res-0.4.0","ruma-client-api-0.12.2","ruma-api-0.18.3","ruma-client-api-0.12.1","ruma-events-0.24.4","ruma-api-0.18.2","ruma-events-0.24.3","ruma-events-0.24.2","ruma-0.3.0","ruma-client-0.7.0","ruma-events-0.24.1","ruma-state-res-0.3.0","ruma-appservice-api-0.4.0","ruma-push-gateway-api-0.3.0","ruma-identity-service-api-0.3.0","ruma-federation-api-0.3.0","ruma-client-api-0.12.0","ruma-api-0.18.1","ruma-signatures-0.9.0","ruma-common-0.6.0","ruma-identifiers-0.20.0","ruma-serde-0.5.0","ruma-client-api-0.11.2","ruma-api-0.17.2","ruma-serde-0.4.2","ruma-events-0.23.3","ruma-events-0.23.2","ruma-api-0.17.1","ruma-events-0.23.1","ruma-identifiers-0.19.4","ruma-serde-0.4.1","ruma-0.2.0","ruma-signatures-0.8.0","ruma-client-0.6.0","ruma-state-res-0.2.0","ruma-appservice-api-0.3.0","ruma-push-gateway-api-0.2.0","ruma-identity-service-api-0.2.0","ruma-federation-api-0.2.0","ruma-client-api-0.11.0","ruma-events-0.23.0","ruma-common-0.5.4","ruma-identifiers-0.19.3","ruma-identifiers-0.19.2","ruma-common-0.5.3","ruma-0.1.2","ruma-signatures-0.7.2","ruma-client-api-0.10.2","ruma-common-0.5.2","ruma-0.1.1","ruma-events-0.22.2","ruma-client-api-0.10.1","ruma-events-0.22.1","ruma-0.1.0","ruma-state-res-0.1.0","ruma-client-0.5.0","ruma-push-gateway-api-0.1.0","ruma-identity-service-api-0.1.0","ruma-appservice-api-0.2.0","ruma-federation-api-0.1.0","ruma-client-api-0.10.0","ruma-api-0.17.0","ruma-events-0.22.0","ruma-common-0.5.1","ruma-signatures-0.7.1","ruma-identifiers-0.19.1","ruma-serde-0.4.0","ruma-client-0.5.0-alpha.2","ruma-0.0.3","ruma-push-gateway-api-0.1.0-alpha.1","ruma-identity-service-api-0.1.0-alpha.1","ruma-federation-api-0.1.0-alpha.2","ruma-client-api-0.10.0-alpha.3","ruma-appservice-api-0.2.0-alpha.3","ruma-api-0.17.0-alpha.4","ruma-events-0.22.0-alpha.3","ruma-common-0.5.0","ruma-signatures-0.7.0","ruma-common-0.4.0","ruma-identifiers-0.19.0","ruma-identifiers-0.18.1","ruma-common-0.3.1","ruma-signatures-0.6.0","ruma-common-0.3.0","ruma-identifiers-0.18.0","ruma-serde-0.3.1","ruma-client-0.5.0-alpha.1","ruma-0.0.2","ruma-push-gateway-api-0.0.1","ruma-identity-service-api-0.0.1","ruma-federation-api-0.1.0-alpha.1","ruma-client-api-0.10.0-alpha.2","ruma-appservice-api-0.2.0-alpha.2","ruma-api-0.17.0-alpha.2","ruma-events-0.22.0-alpha.2","ruma-common-0.3.0-alpha.1","ruma-signatures-0.6.0-alpha.1","ruma-identifiers-0.18.0-alpha.1","ruma-serde-0.3.0","ruma-identifiers-0.17.2","ruma-0.0.1","ruma-client-api-0.10.0-alpha.1","ruma-appservice-api-0.2.0-alpha.1","ruma-federation-api-0.0.3","ruma-api-0.17.0-alpha.1","ruma-events-0.22.0-alpha.1","ruma-serde-0.2.3","ruma-common-0.2.0","ruma-identifiers-0.17.0","0.1.0"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-39252.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N"}]}