{"answers":{"affected":"3 open source packages ship an affected version, including vodozemac.","exploited":"There is no known exploitation of CVE-2024-40640 in the wild and no public exploit code.","fix":"Upgrade vodozemac to 0.7.0 or later.","what":"CVE-2024-40640 is a low-severity vulnerability in matrix-org vodozemac, published on 17 Jul 2024. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-40640 and fix it if it is affected.\n\nWhat it is: CVE-2024-40640 is a low-severity vulnerability in matrix-org vodozemac, published on 17 Jul 2024. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-40640 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- vodozemac (crates.io): affected all versions; fixed in 0.7.0\n- vodozemac (crates.io): affected all versions; fixed in 0.7.0\n- vodozemac (crates.io): affected from 0.0.0-0; fixed in 0.7.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-2024-40640/ (Markdown: https://insights.sbomify.com/CVE-2024-40640/index.md)","id":"CVE-2024-40640","markdown":"https://insights.sbomify.com/CVE-2024-40640/index.md","name":"CVE-2024-40640","record":{"aliases":["GHSA-j8cm-g7r6-hfpq","RUSTSEC-2024-0354"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Rust cryptographic library","requires_auth":"none","summary":"An attacker with high-precision timing access could infer secret key material from vodozemac's non-constant time base64 decoder.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":2.9,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-208","name":"Observable Timing Discrepancy"}],"description":"vodozemac is an open source implementation of Olm and Megolm in pure Rust.  Versions before 0.7.0 of vodozemac use a non-constant time base64 implementation for importing key material for Megolm group sessions and `PkDecryption` Ed25519 secret keys. This flaw might allow an attacker to infer some information about the secret key material through a side-channel attack. The use of a non-constant time base64 implementation might allow an attacker to observe timing variations in the encoding and decoding operations of the secret key material. This could potentially provide insights into the underlying secret key material. The impact of this vulnerability is considered low because exploiting the attacker is required to have access to high precision timing measurements, as well as repeated access to the base64 encoding or decoding processes.  Additionally, the estimated leakage amount is bounded and low according to the referenced paper. This has been patched in commit 734b6c6948d4b2bdee3dd8b4efa591d93a61d272 which has been included in release version 0.7.0. Users are advised to upgrade. There are no known workarounds for this vulnerability.","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":"Usage of non-constant time base64 decoder could lead to leakage of secret key material in vodozemac","id":"CVE-2024-40640","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"information_disclosure","year":"2024"},"n_packages":3,"n_references":3,"next":{"headline":"Unsigned code template execution through workflows in projectdiscovery/nuclei","id":"CVE-2024-40641"},"packages":[{"ecosystem":"crates.io","fixed":["0.7.0"],"introduced":["0"],"last_affected":[],"package":"vodozemac","purl":null,"source":"GHSA-j8cm-g7r6-hfpq"},{"ecosystem":"crates.io","fixed":["0.7.0"],"introduced":["0"],"last_affected":[],"package":"vodozemac","purl":"pkg:cargo/vodozemac","source":"GHSA-j8cm-g7r6-hfpq"},{"ecosystem":"crates.io","fixed":["0.7.0"],"introduced":["0.0.0-0"],"last_affected":[],"package":"vodozemac","purl":"pkg:cargo/vodozemac","source":"RUSTSEC-2024-0354"}],"prev":{"headline":"This CVE is a duplicate of another CVE.","id":"CVE-2024-40639"},"products":["vodozemac"],"published":"2024-07-17","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":"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":"An attacker with high-precision timing access could infer secret key material from vodozemac's non-constant time base64 decoder.","url":"https://insights.sbomify.com/CVE-2024-40640/"}