Skip to content
DayZeroHub
Medium Not yet writtenCVSS 5.9GHSA-vp2j-gqfm-r3cfCVE-2026-63410

CVE-2026-63410: secp256k1-native has a compiler-induced timing side channel in scalar multiplication

secp256k1-native

Preliminary notice: published right away from the original source data, without editorial write-up. It will shortly be replaced by a written and reviewed version.

Summary

CVE-2026-63410: medium-severity vulnerability (CVSS 5.9) in secp256k1-native.

What happened

Original description from the source: ## Summary `Point#mul` — the default, constant-time scalar multiplication and the library's headline secret-scalar operation — could leak timing information about the secret scalar (a private key or ECDSA-style nonce in a downstream consumer) **not because of a source-level bug, but because the compiler reconstructed a branch from branchless source.** The Montgomery ladder selects between point candidates with `uint256_select`, written deliberately branchlessly as `r = (a & ~mask) | (b & mask)` with a mask that is all-ones or all-zeros. GCC 15.2 at `-O2` recognises this select idiom, reconstructs the original boolean condition, and emits a secret-dependent conditional jump (`je`/`jne`). The branch's taken/not-taken timing correlates with the secret scalar bits flowing through the ladder. This silently undid the 0.17.0 fix for the historical |t|=875 infinity-branch leak, which had relied on `uint256_select` compiling to branchless code. ## Impact A timing side-channel on the secret scalar in constant-time scalar multiplication. For a consumer that calls `Point#mul` (or the native `scalar_multiply_ct`) on a secret key or nonce and exposes timing to an attacker (e.g. an online signing oracle), repeated measurements can statistically recover scalar bits — the classic ECC private-key/nonce timing-attack setting (cf. Brumley–Boneh). The leak is in the *compiled binary*; the source is correct, so source review and the deterministic ctgrind check on a *non-reconstructing* toolchain do not reveal it. Pre-1.0 with no published RubyGems dependents, so this is handled as fix-publish-and-document: full GHSA + CVE record without a coordinated downstream-notification timeline. The CVE…

Why it matters

Medium severity, CVSS 5.9.

Affected products and versions

secp256k1-native < 0.18.0 (fixed in 0.18.0)

ProductVersionsFixed in
secp256k1-native< 0.18.00.18.0

Action recommended by the source

Upgrade to a fixed version: 0.18.0.

Fixed in: 0.18.0

Information taken from the source or the vendor. Verify it at the original link before acting.

Sources and references

Weaknesses (CWE): CWE-208, CWE-1255

Relevant change history

  1. Published

    Preliminary advisory published.