tiny-secp256k1 fixes invalid infinity-tweak validation in version 2.2.5

  • tiny-secp256k1
  • WASM
  • infinity
  • derivation

Update fixes incorrect validation of derived points at infinity

The three-argument check could incorrectly accept an invalid key derivation

The maintainers of tiny-secp256k1 and @bitcoin-js/tiny-secp256k1-asmjs fixed a vulnerability in version 2.2.5 of both packages. The issue affected the three-argument xOnlyPointAddTweakCheck function, which checks whether a tweaked key matches a supplied value.

The GitHub advisory says the function could ignore a WebAssembly (WASM) failure and compare an unchanged input buffer. When a tweak produced the point at infinity, the function could return true for an invalid derivation, potentially allowing protocols that rely on the check to accept an invalid key.

The affected tiny-secp256k1 versions are 2.1.0 through 2.2.4; the affected @bitcoin-js/tiny-secp256k1-asmjs versions are 2.2.2 through 2.2.4. Version 2.2.5 checks for backend failure before reading and comparing the output buffer, and returns false when a tweak produces the point at infinity.