CVE-2024-40640: Vodozemac Vodozemac's Usage Of Non-constant Time Vulnerability
MODERATECVE-2024-40640 is a MODERATE (CVSS 3.7) vodozemac's usage of non-constant time vulnerability (CWE-208: Observable Timing Discrepancy) affecting Vodozemac libraries in the crates.io ecosystem. The issue involves vodozemac's usage of non-constant time base64 decoder could lead to leakage of secret key material. Remediation is available by upgrading affected packages to version 0.7.0.
CVE-2024-40640 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2024-40640
To remediate this vulnerability, upgrade all affected Vodozemac dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade vodozemac to 0.7.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for vodozemac
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-40640, inspect your project dependencies for Vodozemac:
inspect dependencies for vodozemac
Analyze the terminal output to locate any version of Vodozemac in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-208: Observable Timing Discrepancy, where two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not. In Vodozemac, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-40640 Affected Vodozemac Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
vodozemac
|
crates.io |
< 0.7.0
|
0.7.0
|
References
Frequently Asked Questions
What is CVE-2024-40640?
Which Vodozemac versions are affected?
What version fixes CVE-2024-40640?
Is vodozemac affected?
What is the CVSS score of CVE-2024-40640?
What CWE is associated with CVE-2024-40640?
How can I check crates.io dependencies for CVE-2024-40640?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-j8cm-g7r6-hfpq",
"modified" : "2024-11-18T16:26:53Z",
"published" : "2024-07-17T18:30:55Z",
"aliases" : [ "CVE-2024-40640" ],
"summary" : "vodozemac's usage of non-constant time base64 decoder could lead to leakage of secret key material",
"details" : "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.\n\n### Impact\n\nThe 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.\n\nThe 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.\n\n### Patches\n\nThe patch is in commit 734b6c6948d4b2bdee3dd8b4efa591d93a61d272.\n\n### Workarounds\nNone.\n\n### References\nA 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.\n\n### For more information\nIf you have any questions or comments about this advisory please email us at [security at matrix.org](mailto:security@matrix.org).\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "vodozemac"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.7.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/matrix-org/vodozemac/security/advisories/GHSA-j8cm-g7r6-hfpq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-40640"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/vodozemac/commit/734b6c6948d4b2bdee3dd8b4efa591d93a61d272"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/vodozemac/commit/77765dace11266ef9523301624a01265c6e0f790"
}, {
"type" : "WEB",
"url" : "https://arxiv.org/abs/2108.04600"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/matrix-org/vodozemac"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2024-0354.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-208" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-07-17T18:30:55Z",
"nvd_published_at" : "2024-07-17T18:15:04Z"
}
}