Skip to content
Heist/ feed
Back to feed
Low

Usage of non-constant time base64 decoder could lead to leakage of secret key material in vodozemac

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-40640
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 15:39 UTC · Revision 1

Source evidence

Usage of non-constant time base64 decoder could lead to leakage of secret key material in vodozemac

core-osv · Original source

Published 17 Jul 2024, 17:27 UTC

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.

osv:CVE-2024-40640
Complete source record
{
  "id": "c378a29f43ea3d7b67f81b3f5a3223e3d890a3508942ae5dcc03de21149ad10f",
  "url": "https://osv.dev/vulnerability/CVE-2024-40640",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Usage of non-constant time base64 decoder could lead to leakage of secret key material in vodozemac",
    "summary": "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.",
    "evidence": "osv:CVE-2024-40640",
    "products": [],
    "severity": "low",
    "structured": {
      "id": "CVE-2024-40640",
      "aliases": [
        "CVE-2024-40640",
        "GHSA-j8cm-g7r6-hfpq",
        "RUSTSEC-2024-0354"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/matrix-org/vodozemac",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "92d6acca73b619a28440003f22c89b4127dd3fdb"
                },
                {
                  "fixed": "734b6c6948d4b2bdee3dd8b4efa591d93a61d272"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.7.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "734b6c6948d4b2bdee3dd8b4efa591d93a61d272"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "0.6.0",
            "0.5.1",
            "0.4.0",
            "0.3.0",
            "0.2.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-40640.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:51.067483414Z",
      "provider": "osv",
      "references": [
        "https://arxiv.org/abs/2108.04600",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/40xxx/CVE-2024-40640.json",
        "https://github.com/matrix-org/vodozemac/security/advisories/GHSA-j8cm-g7r6-hfpq",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-40640",
        "https://github.com/matrix-org/vodozemac/commit/734b6c6948d4b2bdee3dd8b4efa591d93a61d272"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-208"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/40xxx/CVE-2024-40640.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-40640",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 519775,
  "published_at": "2024-07-17T17:27:15.586+00:00"
}