{"answers":{"affected":"3 open source packages ship an affected version, including matrix-sdk-crypto. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-39252 in the wild and no public exploit code.","fix":"Upgrade matrix-sdk-crypto to 0.6.0 or later.","what":"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."},"fix_prompt":"Check this codebase for CVE-2022-39252 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: There is no known exploitation of CVE-2022-39252 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- matrix-sdk-crypto (crates.io): affected all versions; fixed in 0.6.0\n- matrix-sdk-crypto (crates.io): affected all versions; fixed in 0.6.0\n- matrix-sdk-crypto (crates.io): affected from 0.0.0-0; fixed in 0.6.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-39252/ (Markdown: https://insights.sbomify.com/CVE-2022-39252/index.md)","id":"CVE-2022-39252","markdown":"https://insights.sbomify.com/CVE-2022-39252/index.md","name":"CVE-2022-39252","record":{"aliases":["GHSA-vp68-2wrm-69qm","RUSTSEC-2022-0085"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Matrix Rust SDK","requires_auth":"none","summary":"Attackers can impersonate users by inserting invalid room keys because the SDK fails to verify the source of forwarded keys.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"matrix-rust-sdk","vendor":"matrix"}],"cvss":{"score":8.6,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-322","name":"Key Exchange without Entity Authentication"},{"id":"CWE-287","name":"Improper Authentication"}],"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.","ecosystems":["crates.io"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"matrix-sdk-crypto contains potential impersonation via room key forward responses","id":"CVE-2022-39252","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"auth_bypass","year":"2022"},"n_packages":3,"n_references":4,"next":{"headline":"Git subject to exposure of sensitive information via local clone of symbolic links","id":"CVE-2022-39253"},"packages":[{"ecosystem":"crates.io","fixed":["0.6.0"],"introduced":["0"],"last_affected":[],"package":"matrix-sdk-crypto","purl":null,"source":"GHSA-vp68-2wrm-69qm"},{"ecosystem":"crates.io","fixed":["0.6.0"],"introduced":["0"],"last_affected":[],"package":"matrix-sdk-crypto","purl":"pkg:cargo/matrix-sdk-crypto","source":"GHSA-vp68-2wrm-69qm"},{"ecosystem":"crates.io","fixed":["0.6.0"],"introduced":["0.0.0-0"],"last_affected":[],"package":"matrix-sdk-crypto","purl":"pkg:cargo/matrix-sdk-crypto","source":"RUSTSEC-2022-0085"}],"prev":{"headline":"Matrix Javascript SDK vulnerable to Olm/Megolm protocol confusion","id":"CVE-2022-39251"},"products":["matrix-rust-sdk"],"published":"2022-09-29","related":[{"cvss_score":1.3,"headline":"matrix-sdk-base is vulnerable to DoS via custom m.room.join_rules event values","id":"CVE-2025-66622","kev_date_added":null,"published":"2025-12-09"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["matrix-org"]},"summary":"Attackers can impersonate users by inserting invalid room keys because the SDK fails to verify the source of forwarded keys.","url":"https://insights.sbomify.com/CVE-2022-39252/"}