# CVE-2024-40640: Usage of non-constant time base64 decoder could lead to leakage of secret key material in vodozemac

- Severity: Low 2.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2024-07-17T12:00:00.000Z
- Modified: 2026-10-12T18:00:07.418Z
- Also known as: GHSA-j8cm-g7r6-hfpq, RUSTSEC-2024-0354
- Weaknesses: CWE-208
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- matrix-org vodozemac: < 0.7.0
- vodozemac (crates.io): before 0.7.0; from 0.0.0-0 before 0.7.0

## Every score

- GitHub_M: CVSS:3.1 2.9 Low `CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 3.7 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N`

## References

- <https://github.com/matrix-org/vodozemac/security/advisories/GHSA-j8cm-g7r6-hfpq> (web)
- <https://github.com/matrix-org/vodozemac/commit/734b6c6948d4b2bdee3dd8b4efa591d93a61d272> (web)
- <https://arxiv.org/abs/2108.04600> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-40640> (advisory)
- <https://github.com/matrix-org/vodozemac/commit/77765dace11266ef9523301624a01265c6e0f790> (web)
- <https://github.com/matrix-org/vodozemac> (package)
- <https://rustsec.org/advisories/RUSTSEC-2024-0354.html> (advisory, web)
- <https://crates.io/crates/vodozemac> (package)

## Sources

- CVE List: [CVE-2024-40640](https://www.cve.org/CVERecord?id=CVE-2024-40640), CVE Terms of Use, modified 2024-08-02
- GitHub Advisory Database: [GHSA-j8cm-g7r6-hfpq](https://github.com/advisories/GHSA-j8cm-g7r6-hfpq), CC-BY-4.0, modified 2026-09-10
- RustSec Advisory Database: [RUSTSEC-2024-0354](https://rustsec.org/advisories/RUSTSEC-2024-0354.html), CC0-1.0, modified 2026-10-12
- NVD: [CVE-2024-40640](https://nvd.nist.gov/vuln/detail/CVE-2024-40640), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-40640 · Whole record: https://cve.day/CVE-2024-40640.json · Rebuilt by cve.day 2026-11-25T22:58:43.028Z
