Vulnerability DatabaseGHSA-x4gp-pqpj-f43q

GHSA-x4gp-pqpj-f43q
Rust vulnerability analysis and mitigation

Overview

A timing variability vulnerability was discovered in curve25519-dalek's Scalar29::sub (32-bit) and Scalar52::sub (64-bit) functions, identified as GHSA-x4gp-pqpj-f43q. The issue was discovered in June 2024 and affects versions prior to 4.1.3. The vulnerability exists in the cryptographic library's scalar subtraction operations where LLVM compiler optimization could introduce timing variations through branch instructions (GitHub Advisory, RustSec Advisory).

Technical details

The vulnerability stems from the usage of mask values inside loops where LLVM compiler saw opportunities to insert branch instructions (specifically 'jns' on x86 architecture) to conditionally bypass code sections when mask values are set to zero. This behavior was observed in both 32-bit implementation (at line 106) and 64-bit implementation (at line 48) of the scalar subtraction functions. The issue was discovered using the DATA tool by researchers from Fraunhofer AISEC and Technical University of Munich (GitHub PR).

Impact

The timing variability in cryptographic operations can potentially leak private keys and other secrets when working with elliptic curve scalars. This type of vulnerability could enable side-channel attacks that exploit timing differences in operations to extract sensitive information (RustSec Advisory).

Mitigation and workarounds

The vulnerability has been patched in version 4.1.3 of curve25519-dalek. The fix introduces a volatile read as an optimization barrier, which prevents the compiler from optimizing away the critical code sections. The solution was validated using godbolt compiler explorer and independently verified by the original researchers (GitHub PR).

Additional resources


SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-65807HIGH8.4
  • RustRust
  • rust-sd
NoNoDec 10, 2025
CVE-2025-66627HIGH7.8
  • RustRust
  • wasmi
NoYesDec 09, 2025
CVE-2025-67487MEDIUM5.5
  • RustRust
  • static-web-server
NoYesDec 09, 2025
CVE-2025-66622LOW1.3
  • RustRust
  • matrix-sdk-base
NoYesDec 09, 2025
RUSTSEC-2025-0135N/AN/A
  • RustRust
  • matrix-sdk-base
NoYesDec 08, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management