CVE-2024-58262
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-07-27

Last updated on: 2025-08-07

Assigner: MITRE

Description
The curve25519-dalek crate before 4.1.3 for Rust has a constant-time operation on elliptic curve scalars that is removed by LLVM.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-07-27
Last Modified
2025-08-07
Generated
2026-05-07
AI Q&A
2025-07-27
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
dalek curve25519-dalek to 4.1.3 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-733 The developer builds a security-critical protection mechanism into the software, but the compiler optimizes the program such that the mechanism is removed or modified.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

CVE-2024-58262 is a timing variability vulnerability in the Rust cryptographic library curve25519-dalek, specifically in the scalar subtraction functions Scalar29::sub and Scalar52::sub. The LLVM compiler optimizes the code by inserting a conditional branch instruction to skip code when a mask value is zero. This branching causes timing differences during execution, which can leak secret information such as private keys. The vulnerability breaks the constant-time operation guarantee critical for cryptographic security. The fix involves introducing a volatile read as an optimization barrier to prevent the compiler from inserting these branches, thus restoring constant-time behavior. [1, 2]


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by analyzing the compiled assembly code of the curve25519-dalek library, specifically looking for timing variability introduced by conditional branch instructions such as 'jns' on x86 architectures in the Scalar29::sub and Scalar52::sub functions. One approach is to use tools like Godbolt Compiler Explorer to inspect the generated assembly code for these functions and check for the presence of conditional jumps that break constant-time guarantees. There are no specific network or system commands provided, but inspecting the assembly output of the affected functions is key to detection. [1, 2]


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, update the curve25519-dalek crate to version 4.1.3 or later, where the fix has been applied. The fix introduces a volatile read as an optimization barrier to prevent LLVM from inserting conditional branches that cause timing variability. This ensures constant-time execution of the scalar subtraction functions and prevents leakage of secret information. Applying this update will eliminate the timing side-channel vulnerability. [1, 2]


How can this vulnerability impact me? :

This vulnerability can lead to the leakage of secret cryptographic information, such as private keys, through timing side-channel attacks. Because the scalar subtraction operations are not constant-time due to compiler optimizations, an attacker could potentially measure execution time variations to infer sensitive data. This compromises the security of cryptographic operations relying on curve25519-dalek, potentially undermining confidentiality and security guarantees. [1, 2]


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart