CVE-2024-40640
Usage of non-constant time base64 decoder could lead to leakage of secret key material in vodozemac
Also known as GHSA-j8cm-g7r6-hfpq, RUSTSEC-2024-0354
Mitigation
- Upgrade vodozemac to 0.7.0 or later.
Who should check
- Projects that depend on crates.io package vodozemac (< 0.7.0)
- Anyone running matrix-org vodozemac < 0.7.0
Vulnerability facts
- Affected
- vodozemac < 0.7.0
- Fixed in
- 0.7.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 2.9 (v3.1, CNA)CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: High
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: Low
- Integrity impact: None
- Availability impact: None
- EPSS
- 0.28% chance of exploitation in 30 days (percentile 13, 2026-11-26)
- CWE
- CWE-208
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| crates.io vodozemac | < 0.7.0 | 0.7.0 | osv |
| matrix-org vodozemac | < 0.7.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-40640. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-40640.md Affected: vodozemac < 0.7.0 Fixed in: 0.7.0 Steps: 1. Search this machine and project for vodozemac (crates.io), matrix-org vodozemac: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
FAQ
Is CVE-2024-40640 being exploited?
There is no confirmed exploitation: CVE-2024-40640 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-40640?
Low: CVSS 2.9 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2024-40640?
vodozemac < 0.7.0.
Is there a fix for CVE-2024-40640?
Yes. Fixed in 0.7.0. Upgrade vodozemac to 0.7.0 or later.
How do I check if I'm affected by CVE-2024-40640?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.