# CVE-2026-63410: secp256k1-native: Compiler-reconstructed secret-dependent branch in native scalar multiplication

- Severity: Medium 5.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.48%, higher than 42% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-10-30T22:48:09.173Z
- Modified: 2026-11-23T21:15:06.164Z
- Also known as: GHSA-vp2j-gqfm-r3cf
- Weaknesses: CWE-208, CWE-1255
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- sgbett secp256k1-native: >= 0.17.0, < 0.18.0
- secp256k1-native (RubyGems): before 0.18.0

## Every score

- GitHub_M: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/sgbett/secp256k1-native/security/advisories/GHSA-vp2j-gqfm-r3cf> (exploit, web)
- <https://github.com/sgbett/secp256k1-native/pull/32> (web)
- <https://github.com/sgbett/secp256k1-native/commit/a89bea1617a2d063c6545ad44565dc22098c880e> (web)
- <https://github.com/sgbett/secp256k1-native/blob/master/docs/advisories/0001-compiler-reconstructed-ct-branch.md> (web)
- <https://github.com/sgbett/secp256k1-native/releases/tag/v0.18.0> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-63410> (advisory)
- <https://github.com/sgbett/secp256k1-native> (package)

## Sources

- CVE List: [CVE-2026-63410](https://www.cve.org/CVERecord?id=CVE-2026-63410), CVE Terms of Use, modified 2026-11-02
- GitHub Advisory Database: [GHSA-vp2j-gqfm-r3cf](https://github.com/advisories/GHSA-vp2j-gqfm-r3cf), CC-BY-4.0, modified 2026-11-23
- NVD: [CVE-2026-63410](https://nvd.nist.gov/vuln/detail/CVE-2026-63410), Public domain, modified 2026-11-02

---

Page: https://cve.day/CVE-2026-63410 · Whole record: https://cve.day/CVE-2026-63410.json · Rebuilt by cve.day 2026-11-25T22:59:48.046Z
