CVE-2026-63410: secp256k1-native has a compiler-induced timing side channel in scalar multiplication
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.
References
- github.com/advisories/GHSA-vp2j-gqfm-r3cf
- github.com/sgbett/secp256k1-native/blob/master/docs/advisories/0001-compiler-reconstructed-ct-branch.md
- github.com/sgbett/secp256k1-native/commit/a89bea1617a2d063c6545ad44565dc22098c880e
- github.com/sgbett/secp256k1-native/pull/32
- github.com/sgbett/secp256k1-native/releases/tag/v0.18.0
- github.com/sgbett/secp256k1-native/security/advisories/GHSA-vp2j-gqfm-r3cf
- nvd.nist.gov/vuln/detail/CVE-2026-63410
Code Behaviors & Features
Detect and mitigate CVE-2026-63410 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →