Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2024-58262 — curve25519-dalek

🟢 CVSS 2.0 — Low ✅ No Known Exploit CWE-203 OSV
2.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

curve25519-dalek has timing variability in curve25519-dalek's Scalar29::sub/Scalar52::sub

Timing variability of any kind is problematic when working with potentially secret values such as elliptic curve scalars, and such issues can potentially leak private keys and other secrets. Such a problem was recently discovered in curve25519-dalek.

The Scalar29::sub (32-bit) and Scalar52::sub (64-bit) functions contained usage of a mask value inside a loop where LLVM saw an opportunity to insert a branch instruction (jns on x86) to conditionally bypass this code section when the mask value is set to zero as can be seen in godbolt:

  • 32-bit (see L106): https://godbolt.org/z/zvaWxzvqv
  • 64-bit (see L48): https://godbolt.org/z/PczYj7Pda

A similar problem was recently discovered in the Kyber reference implementation:

https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/hqbtIGFKIpU/m/cnE3pbueBgAJ

As discussed on that thread, one portable solution, which is also used in this PR, is to introduce a volatile read as an optimization barrier, which prevents the compiler from optimizing it away.

The fix can be validated in godbolt here:

  • 32-bit: https://godbolt.org/z/jc9j7eb8E
  • 64-bit: https://godbolt.org/z/x8d46Yfah

The problem was discovered and the solution independently verified by Alexander Wagner <[email protected]> and Lea Themint <[email protected]> using their DATA tool:

https://github.com/Fraunhofer-AISEC/DATA

How this vulnerability can be exploited

This issue can be reached with local access to the system, attack complexity is high, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality low, integrity none, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N

  • Attack vector: Local — a local account, shell or session on the host is needed.
  • Attack complexity: High — the attacker first has to win a race, learn a secret or otherwise prepare the target.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: Low — limited, and the attacker does not choose what is affected.
  • Integrity impact: None.
  • Availability impact: None.

Weakness class

CVE-2024-58262 is classified as CWE-203: Observable Discrepancy. The product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor.

Affected software

CVE-2024-58262 is recorded against 1 package.

  • curve25519-dalek

Timeline and source

Published on 18 June 2024 and last revised on 17 June 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from OSV.

References

crates.io (Package)
rustsec.org (Advisory)
github.com (Web)

Other advisories for this package

curve25519-dalek has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-203: Observable Discrepancy) in other software:

CVE-2024-58262 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity LOW
CVSS Score 2.0
CVSS Vector CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
CWE CWE-203
Public Exploit ✅ No
Source OSV
Published 2024-06-18
Updated 2026-08-20
Modified 2026-06-17

Affected Packages

Software From version Fixed in
curve25519-dalek — —

Similar Threats

Free Vulnerability Check

Is your site affected by CVE-2024-58262?

BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against CVE-2024-58262 and other known CVE records.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2024
✓