All vulnerabilities

RubyGems

CVE-2026-63410

secp256k1-native has a compiler-induced timing side channel in scalar multiplication

Severity
Medium 5.9
Published
23 Nov 2026
Last changed
23 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
0.18.0
Exploit chance
0.3% in the next 30 daysHigher than 20% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
CWE-1255Timing discrepancy (CWE-208)
Attack
Over the network · Only under certain conditions · No login needed · No user action needed
Attacker can
Read data
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Also known as
GHSA-vp2j-gqfm-r3cf
Sources
OSV.dev and GitHub

Description

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.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Workarounds

  • Upgrade to v0.18.0 (recommended).
  • Or: compile the extension at -O0/-O1, or with a compiler that does not reconstruct the select (verify with objdump -dl) — fragile, not recommended.
  • Do not call Point#mul on secret scalars from a timing-observable context until patched.
Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
secp256k1-nativeRubyGems · osv:RubyGems:secp256k1-native
  • Every version before 0.18.0

About secp256k1-native

Total downloads (RubyGems)
5,310RubyGems, 24 Nov 2026

This is the only vulnerability in secp256k1-native in our list.

References