This is a joint post by Nomadic Labs, TriliTech and Functori
TL;DR
A new release of octez.connect, v5.0.5, fixes a set of vulnerabilities in pairing and session-control validation inherited from the Beacon SDK lineage.
All dApps using @tezos-x/octez.connect-\* ≤ 5.0.4 (including the 4.8.x line) or @tezos-x/octez.js-dapp-wallet 25.0.0 or 25.1.0-rc.0 should upgrade now.
Wallets built on the octez.connect wallet SDK should also upgrade.
These issues do not expose wallet private keys and do not allow anyone to forge signatures from a user’s wallet. They affect how a dApp decides which wallet peers to trust and which session messages to accept.
Who is affected
| Package | Affected | Fixed in |
|---|---|---|
@tezos-x/octez.connect-\* |
≤ 5.0.4, 4.8.x | 5.0.5 |
@tezos-x/octez.js-dapp-wallet |
25.0.0, 25.1.0-rc.0 | 25.0.1, 25.1.0-rc.1 (release in progress) |
@airgap/beacon-\* |
≤ 4.8.1 | @tezos-x/octez.connect-\* 5.0.5 or @ecadlabs/beacon-\* 4.8.5-ecad |
@ecadlabs/beacon-\* |
< 4.8.5-ecad | 4.8.5-ecad |
@taquito/beacon-wallet |
≤ 25.1.0, 25.2.0-beta0 | 25.1.1 |
What you should do
dApp developers
-
Upgrade to
@tezos-x/octez.connect-\*@5.0.5(or@tezos-x/octez.js-dapp-wallet@25.0.1or@25.1.0-rc.1being released at the time of this announcement). If you use Taquito with the ECAD packages, upgrade to@taquito/\*@25.1.1. -
Peers registered before the upgrade remain in storage. If you have any reason to suspect your dApp was targeted, clear stored peers and ask users to re-pair.
-
Behavior change to be aware of: pending pairing requests are now tracked in memory. Reloading the page while a pairing is in progress invalidates it, and the user will need a fresh QR code or deep link. Existing, completed pairings restore normally.
Wallet developers
Upgrade the wallet SDK to 5.0.5. The Matrix room-invite and routing fixes also apply on the wallet side.
End users
No action required beyond using up-to-date dApps and wallets. If a dApp unexpectedly disconnects you or shows an account you don’t recognize, disconnect and pair again.
What was fixed
- Unsolicited pairing responses. The SDK accepted a pairing response without checking that it matched a pairing request the dApp had actually issued. Since a sealed box only requires the recipient’s public key, decrypting a message did not prove who sent it. Pairing responses are now correlated to a live, single-use, time-limited pairing request (Matrix and extension transports).
- Matrix room invites and routing. The client automatically joined any room it was invited to, and updated room routing before authenticating the sender. Invites and relay updates are now the dApp only joins rooms while a pairing is open or when invited by a paired wallet, and only changes routing after a message is authenticated or already-authenticated peers.
- Sender binding and session-control messages. The senderId inside a decrypted message is now bound to the sender’s public key. ChangeAccountRequest is only accepted from the active peer and must carry a consistent address and public key, and Disconnect only removes the records of the peer that sent it.
- Closing the pairing popup also invalidates its QR code
- Wallets must answer with the pairing request’s ID, from the relay user that owns their key.
octez.js-dapp-wallet
octez.js-dapp-wallet v25.0.0 and v25.1.0-rc.0 explicitly pinned octez.connect v5.0.4.
At the time of this announcement, octez.js 25.0.1 and 25.1.0-rc.1 are being released and will be available on npm shortly.
Credits and acknowledgments
We thank David Kaminski (@dvkam) for discovering and reporting these issues, and for the reproduction harness and original patches, and ECAD Labs for the hardening work, the conformance testing, the coordinated disclosure, and the fixed @ecadlabs/beacon-\* and Taquito releases, which protected a large part of the ecosystem ahead of this release.
The report also raised fair points about octez.connect’s responsiveness. Here is what we are changing:
- the reconnect fix (#55) is included in v5.0.5
- private vulnerability reporting is enabled on
trilitech/octez.connect