{"answers":{"affected":"3 open source packages ship an affected version, including matrix-sdk-crypto.","exploited":"There is no known exploitation of CVE-2024-40648 in the wild and no public exploit code.","fix":"Upgrade matrix-sdk-crypto to 0.7.2 or later.","what":"CVE-2024-40648 is a medium-severity authentication bypass vulnerability in matrix-org matrix-rust-sdk, published on 18 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-40648 and fix it if it is affected.\n\nWhat it is: CVE-2024-40648 is a medium-severity authentication bypass vulnerability in matrix-org matrix-rust-sdk, published on 18 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-40648 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.7.2\n- matrix-sdk-crypto (crates.io): affected all versions; fixed in 0.7.2\n- matrix-sdk-crypto (crates.io): affected from 0.0.0-0; fixed in 0.7.2\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-2024-40648/ (Markdown: https://insights.sbomify.com/CVE-2024-40648/index.md)","id":"CVE-2024-40648","markdown":"https://insights.sbomify.com/CVE-2024-40648/index.md","name":"CVE-2024-40648","record":{"aliases":["GHSA-4qg4-cvh2-crgg","RUSTSEC-2024-0356","openSUSE-SU-2024:14224-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Matrix Rust SDK","requires_auth":"low_privilege","summary":"A malicious homeserver can manipulate identity verification status, causing the SDK to incorrectly trust unverified users during sensitive operations.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":5.4,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-287","name":"Improper Authentication"}],"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.","ecosystems":["crates.io","openSUSE:Tumbleweed"],"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's `UserIdentity::is_verified` not checking verification status of own user identity while performing the check","id":"CVE-2024-40648","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"auth_bypass","year":"2024"},"n_packages":4,"n_references":2,"next":{"headline":"Use after free in Android","id":"CVE-2024-40649"},"packages":[{"ecosystem":"crates.io","fixed":["0.7.2"],"introduced":["0"],"last_affected":[],"package":"matrix-sdk-crypto","purl":null,"source":"GHSA-4qg4-cvh2-crgg"},{"ecosystem":"crates.io","fixed":["0.7.2"],"introduced":["0"],"last_affected":[],"package":"matrix-sdk-crypto","purl":"pkg:cargo/matrix-sdk-crypto","source":"GHSA-4qg4-cvh2-crgg"},{"ecosystem":"crates.io","fixed":["0.7.2"],"introduced":["0.0.0-0"],"last_affected":[],"package":"matrix-sdk-crypto","purl":"pkg:cargo/matrix-sdk-crypto","source":"RUSTSEC-2024-0356"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["20240730-1.1"],"introduced":["0"],"last_affected":[],"package":"cargo-audit-advisory-db","purl":"pkg:rpm/opensuse/cargo-audit-advisory-db\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:14224-1"}],"prev":{"headline":"Unintentional exposure of environment variables to subprocesses in sentry-sdk","id":"CVE-2024-40647"},"products":["matrix-rust-sdk"],"published":"2024-07-18","related":[],"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":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["matrix-org"]},"summary":"A malicious homeserver can manipulate identity verification status, causing the SDK to incorrectly trust unverified users during sensitive operations.","url":"https://insights.sbomify.com/CVE-2024-40648/"}