2.9low
Usage of non-constant time base64 decoder could lead to leakage of secret key material in vodozemac
- Severity
- 2.9low CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.20% (higher than 10% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-j8cm-g7r6-hfpqRUSTSEC-2024-0354
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
| Product or package | Versions | Reported by |
|---|---|---|
| matrix-org vodozemac | < 0.7.0 | CVE List |
| vodozemac (crates.io) | before 0.7.0, from 0.0.0-0 before 0.7.0 | GitHub Advisory Database, RustSec Advisory Database |
All scores
| GitHub_M | 2.9low CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
| GitHub | 3.7medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N |
| GitHub | medium CVSS:4.0 | 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 |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
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.
Impact
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.
Patches
The patch is in commit 734b6c6948d4b2bdee3dd8b4efa591d93a61d272.
Workarounds
None.
References
A detailed description of the precise attack can be found at https://arxiv.org/abs/2108.04600. We kindly thank Soatok for pointing out this research to us.
For more information
If you have any questions or comments about this advisory please email us at security at matrix.org.
RustSec Advisory Database
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.
Impact
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[1].
NVD (es)
vodozemac es una implementación de código abierto de Olm y Megolm en Rust puro. Las versiones anteriores a la 0.7.0 de vodozemac utilizan una implementación base64 de tiempo no constante para importar material clave para sesiones de grupo Megolm y claves secretas `PkDecryption` Ed25519. Esta falla podría permitir a un atacante inferir cierta información sobre el material de la clave secreta a través de un ataque de canal lateral. El uso de una implementación de base64 de tiempo no constante podría permitir a un atacante observar variaciones de tiempo en las operaciones de codificación y decodificación del material de clave secreta. Potencialmente, esto podría proporcionar información sobre el material de la clave secreta subyacente. El impacto de esta vulnerabilidad se considera bajo porque para explotar al atacante se requiere tener acceso a mediciones de tiempo de alta precisión, así como acceso repetido a los procesos de codificación o decodificación base64. Además, la cantidad estimada de fuga es limitada y baja según el documento de referencia. Esto se ha parcheado en el commit 734b6c6948d4b2bdee3dd8b4efa591d93a61d272 que se ha incluido en la versión 0.7.0. Se recomienda a los usuarios que actualicen. No se conocen workarounds para esta vulnerabilidad.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-40640 changed 2024-08-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-j8cm-g7r6-hfpq changed 2026-09-10 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2024-0354 changed 2026-10-12 | CC0-1.0 |
| NVD | CVE-2024-40640 changed 2026-06-17 | Public domain |