tiny-secp256k1: Stale buffer after ignored wasm failure accepts invalid infinity tweak
- CVE-2026-107853
- GHSA-hj9c-qx2w-g7mh
- EUVD-2026-127356
Description
tiny-secp256k1 is a tiny secp256k1 native/JS wrapper. From 2.1.0 until 2.2.5 for tiny-secp256k1 and from 2.2.2 until 2.2.5 for @bitcoin-js/tiny-secp256k1-asmjs, the three-argument xOnlyPointAddTweakCheck path ignores the backend failure return from xOnlyPointAddTweak when a tweak produces the point at infinity. The shared X_ONLY_PUBLIC_KEY_INPUT buffer then still contains the original point, so a caller-controlled resultToCheck equal to that point can make the stale-buffer comparison return true even though no tweaked key exists. Protocols that rely on this helper to validate caller-controlled internal keys, tweaks, and comparison values can accept an invalid derived key. This issue is fixed in version 2.2.5.
Text from the CVE.org record.
Recommendation
@bitcoin-js/tiny-secp256k1-asmjs
- If you run 2.2.xupdate to 2.2.5 or laterPatch update: breaking changes are unlikely@bitcoin-js/tiny-secp256k1-asmjs 2.2.5 on its registry (opens in a new tab)
tiny-secp256k1
- If you run a version from 2.1.0 to before 2.2.5update to 2.2.5 or laterMinor version change: check the release notestiny-secp256k1 2.2.5 on its registry (opens in a new tab)
Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
@bitcoin-js iny-secp256k1-asmjs
Affected versions Fixed in >= 2.2.2, < 2.2.5 none stated bitcoinjs tiny-secp256k1
Affected versions Fixed in >= 2.1.0, < 2.2.5 none stated @bitcoin-js/tiny-secp256k1-asmjsnpm
Affected versions Fixed in from 2.2.2 to before 2.2.5 2.2.5 tiny-secp256k1npm
Affected versions Fixed in from 2.1.0 to before 2.2.5 2.2.5
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.