CVE-2026-63410 Details
Description
secp256k1-native is a native C secp256k1 implementation for Ruby. In affected native builds, native constant-time scalar multiplication through `Point#mul` or `scalar_multiply_ct` can leak timing information about a secret scalar when compiled by a toolchain that reconstructs branchless selection into a branch. The `Montgomery ladder` uses `uint256_select` with an all-zeros or all-ones mask, but affected GCC builds at `-O2` recover the original condition and emit secret-dependent `je` or `jne` jumps whose timing correlates with scalar bits. This defeats the assumption behind the 0.17.0 `jp_add_internal` infinity-branch fix. A consumer must multiply a secret private key or nonce in a context where an attacker can observe timing; repeated measurements can statistically recover scalar bits. The defect is in the compiled binary, so source review or `ctgrind` on a non-reconstructing toolchain may miss it. GCC 14.3.0, 15.1.0, and 15.2.0 reproduced the branch reconstruction, and `extconf.rb` appends `-O2`. Tested GCC versions through 12.4.0 used bitwise operations and GCC 13.3.0 used constant-time `cmov`; the pure-Ruby path is not affected by this flaw and separately makes no constant-time claim. GCC 16 and clang were untested, and point releases, targets, and flag combinations were not exhaustively bisected. `Earlier pre-0.17.0 versions had different constant-time issues rather than this introduced select idiom.` Version 0.18.0 contains the verified fix. The advisory's broad pre-0.18.0 guidance also covers earlier, different constant-time issues; whether this CVE groups those issues or only the select idiom introduced in 0.17.0 remains unresolved.
A timing side-channel vulnerability has been identified in the secp256k1-native library, a C implementation of the secp256k1 curve for Ruby. This vulnerability affects versions prior to 0.18.0 and arises when the library is compiled with certain GCC toolchain versions (14.3.0, 15.1.0, and 15.2.0) that reconstruct branchless code into a branch, creating a timing leak of secret scalars during scalar multiplication operations. The issue was introduced in version 0.17.0 with the 'jp_add_internal' function, which relied on a branchless selection method that GCC 15.2 at '-O2' could revert, allowing attackers to statistically recover private key or nonce information through timing observations. The vulnerability is not present in the pure-Ruby execution path or in earlier secp256k1-native versions, which had different constant-time issues.
Users are advised to upgrade to secp256k1-native version 0.18.0, which includes a patch that prevents the timing leak by introducing a value barrier in the constant-time selection process, ensuring that all select masks are handled in a way that GCC cannot optimize into a branch. This version is available on RubyGems.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 30, 2026CISA-ADP
Assessed Nov 2, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/sgbett/secp256k1-native/security/advisories/GHSA-vp2j-gqfm-r3cf | CISA-ADP | AdvisoryRemedyVendor |
| https://github.com/sgbett/secp256k1-native/blob/master/docs/advisories/0001-compiler-reconstructed-ct-branch.md | [email protected] | AdvisoryRemedyTechnical AnalysisVendor |
| https://github.com/sgbett/secp256k1-native/commit/a89bea1617a2d063c6545ad44565dc22098c880e | [email protected] | Source CodeVendor |
| https://github.com/sgbett/secp256k1-native/pull/32 | [email protected] | Issue TrackingVendor |
| https://github.com/sgbett/secp256k1-native/releases/tag/v0.18.0 | [email protected] | Release NotesVendor |
| https://github.com/sgbett/secp256k1-native/security/advisories/GHSA-vp2j-gqfm-r3cf | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-1255 | Comparison Logic is Vulnerable to Power Side-Channel Attacks | [email protected] |
| CWE-208 | Observable Timing Discrepancy | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| sgbett secp256k1-native | < 0.18.0 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Nov 2, 2026 | CVE Modified | CISA-ADP |
| Oct 30, 2026 | New CVE Received | [email protected] |
Volerion