cvelo
P3 · MediumCVSS 6.3EPSS 0.5%

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

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 versionsFixed in
    >= 2.2.2, < 2.2.5none stated
  • bitcoinjs tiny-secp256k1

    Affected versionsFixed in
    >= 2.1.0, < 2.2.5none stated
  • @bitcoin-js/tiny-secp256k1-asmjsnpm

    Affected versionsFixed in
    from 2.2.2 to before 2.2.52.2.5
  • tiny-secp256k1npm

    Affected versionsFixed in
    from 2.1.0 to before 2.2.52.2.5

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.