CVE-2026-63410
Received Received - Intake

Timing Side-Channel in secp256k1-native Ruby Gem

Vulnerability report for CVE-2026-63410, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-30

Last updated on: 2026-10-30

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-30
Last Modified
2026-10-30
Generated
2026-10-31
AI Q&A
2026-10-31
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
sgbett secp256k1-native >= 0.17.0, < 0.18.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-1255 A device's real time power consumption may be monitored during security token evaluation and the information gleaned may be used to determine the value of the reference token.
CWE-208 Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability affects secp256k1-native, a C implementation for Ruby, where native constant-time scalar multiplication can leak timing information about a secret scalar when compiled by certain toolchains like GCC. The issue occurs because affected GCC builds at -O2 reconstruct branchless selection into secret-dependent branches, allowing attackers to observe timing correlations and recover scalar bits through repeated measurements.

Detection Guidance

This vulnerability is a timing side-channel issue in compiled binaries of secp256k1-native affecting scalar multiplication. Detection requires checking if the affected versions (pre-0.18.0) are installed and compiled with vulnerable GCC toolchains. Review gem versions and compiler flags used during installation. No direct network detection commands apply as this is a local binary issue.

Impact Analysis

If you use secp256k1-native in a context where an attacker can measure execution timing, they may statistically recover secret private keys or nonces. This is particularly dangerous in cryptographic operations like digital signatures or key exchanges where secrecy is critical.

Mitigation Strategies

Upgrade to version 0.18.0 or later of secp256k1-native which contains the verified fix. If using GCC, consider compiling with flags that avoid branch reconstruction or use alternative toolchains like Clang if possible. Review and rebuild dependencies to ensure no vulnerable binaries remain.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-63410. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart