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

Status: published. Published: 2026-10-30. Updated: 2026-11-02.

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.

## Remediation

No remediation reported in collected sources

## Affected products and versions

- sgbett / secp256k1-native: >= 0.17.0, < 0.18.0 (affected). Source: CNA: GitHub_M

## Severity and prioritization

- 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; source: CNA: GitHub_M

- CISA KEV: No listing in collected sources

- EPSS: 0.28% as of 2026-11-02; percentile 20.64%

- SSVC: exploitation poc; automatable no; technical impact partial; source ADP: CISA-ADP

- Weaknesses: CWE-208, CWE-1255

## Exploit evidence

- exploit: https://github.com/sgbett/secp256k1-native/security/advisories/GHSA-vp2j-gqfm-r3cf (ADP: CISA-ADP)

## References

- https://github.com/sgbett/secp256k1-native/security/advisories/GHSA-vp2j-gqfm-r3cf (CNA: GitHub_M; x_refsource_CONFIRM)

- https://github.com/sgbett/secp256k1-native/pull/32 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/sgbett/secp256k1-native/commit/a89bea1617a2d063c6545ad44565dc22098c880e (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/sgbett/secp256k1-native/blob/master/docs/advisories/0001-compiler-reconstructed-ct-branch.md (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/sgbett/secp256k1-native/releases/tag/v0.18.0 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/sgbett/secp256k1-native/security/advisories/GHSA-vp2j-gqfm-r3cf (ADP: CISA-ADP; exploit)

## Provenance

- CNA: GitHub_M: https://www.cve.org/CVERecord?id=CVE-2026-63410; retrieved 2026-11-02; source updated 2026-11-02

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-63410; retrieved 2026-11-02; source updated Not reported

Revision: 8e3e7a58d03cb83facdfa9189798468771da0e185ce3f4e0c3ca2fedcb53ea9e

Canonical: https://y2.dev/cve/CVE-2026-63410

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.