Threshold Network — Write-up
← Back

Threshold Network · Bug bounty · 2026-08

One node operator could get a key only they control installed as tBTC's next deposit wallet

Severity:High
Impact:Direct theft of user funds
Note:Critical impact, rated High by the project because exploitation requires a permissioned protocol role (an allowlisted node operator).

One tBTC node operator could get a key they generated alone accepted as the wallet for every new deposit, and silence the automatic check meant to stop it. tBTC keeps users' bitcoin in wallets whose keys are split into 100 shares held by operators drawn at random from a pool, so that no single operator can spend. Reported via Immunefi in August 2026. Fixed by a node-client update in October 2026 and a contract upgrade in November 2026.

Background

tBTC is a bridge from Bitcoin to Ethereum: a user sends BTC to the bridge's current deposit wallet (the "active wallet") and receives tBTC.

A new wallet key is created in three steps:

  1. Key generation. A group of operators is drawn at random from the pool of registered operators (the "sortition pool"). Off-chain, the group jointly generates one Bitcoin key, split into 100 shares held by those operators. Signing takes 51 shares, and no single operator ever holds the whole key. This ceremony is called DKG, distributed key generation.
  2. Submission. One operator posts the result, with the new public key, to the registry contract on Ethereum. The contract checks who submits the result, but does not validate its contents.
  3. Challenge window. For about 38 hours anyone can challenge the result. The full validation runs only if someone challenges, and it throws a bad result out. Every node runs an automatic challenger for this. If nobody challenges, the result is approved and the key becomes the active wallet.

So the only thing between a submitted key and users' deposits is that someone challenges in time.

Operators are not anonymous outsiders: the project admits them to the pool through its own allowlist. But the design does not rely on any one of them being honest. Only a majority of a group is trusted, which is why the key is split in the first place. A single operator acting alone is exactly the attacker this scheme is meant to withstand.

How it worked

The code is shown as it was when reported; the snippets are abridged.

1. Nothing checked where the key came from. The contract checked only the key's shape, a length and a non-zero X coordinate, and that the key was new (Wallets.validatePublicKey):

require(publicKey.length == 64, "Invalid length of the public key");
// ...
bytes32 publicKeyX = bytes32(publicKey[:32]);
require(publicKeyX != bytes32(0), "Wallet public key must be non-zero");

Nothing tied the key to the selected operators or to their signatures. An operator could submit a key they generated alone, and unless someone challenged, it would be installed after the window (approveDkgResult).

2. The automatic challenger could be silenced. Before challenging, a node asked the contract a read-only question: is this result valid (isDkgResultValid)? Part of that check read the list of group members at each position that claimed to have signed, without first checking how long the list was (EcdsaDkgValidator.validateSignatures):

for (uint256 i = 0; i < signingMembersIndices.length; i++) {
    signingMemberIds[i] = result.members[signingMembersIndices[i] - 1];
}

With a member list that was too short, the check crashed with an out-of-bounds error (Panic(0x32)) instead of answering "invalid". The node treated any error as "cannot tell" and returned without challenging (pkg/tbtc/dkg.go):

isValid, err := de.chain.IsDKGResultValid(result)
if err != nil {
    dkgLogger.Errorf("cannot validate DKG result: [%v]", err)
    return
}

A challenge sent by hand would still have worked, because the challenge itself treated a crash as an invalid result. But the node's challenger was the only automated one. As of the report date: 89 key-generation rounds, 56 submitted results, none challenged.

3. Retries were free. A rejected attempt carried no real penalty, and each new submission started a new window. The defence had to work in every round; the attacker needed one unchallenged window.

Related: key generation could be frozen until an upgrade. A result can also list operators who misbehaved during the ceremony, by position. The contract range-checked that list only when it had more than one entry (validateFields):

if (misbehavedMembersIndices.length > 1) {
    if (
        misbehavedMembersIndices[0] < 1 ||
        misbehavedMembersIndices[misbehavedMembersIndices.length - 1] > groupSize
    ) {
        return (false, "Corrupted misbehaved members indices");
    }

So a list holding the single value 0 passed this bounds check. If such a result also went unchallenged for the whole window, approval would then fail on every call, because 0 - 1 reverts with an arithmetic error, Panic(0x11) (EcdsaDkg.approveResult):

misbehavedMembers[i] = result.members[
    result.misbehavedMembersIndices[i] - 1
];

There was no other way out of that state, so no new wallet could have been created until the contract was upgraded. Existing wallets would have kept working, and no funds would have moved.

Impact

Wallets created earlier would stay as they were. But every new deposit would go to a Bitcoin address only the attacker could spend from, and the attacker could spend it at once, while the depositor's own refund path is time-locked. An attacker's wallet would keep the active role until the next new wallet is created. The wallet in that role when this was reported had held it for about 97 days and taken in about 945 BTC. Rotating it out does not bring back bitcoin already moved.

Timeline

Date Event
7 Aug 2026 Reported via Immunefi
26 Aug 2026 Confirmed by Threshold
Oct 2026 Node-client fix released
23 Oct 2026 Bounty paid
Nov 2026 Contract upgrade

Takeaway

A defence that has never fired is an assumption. Here the challenge was the only check, and when its own validity call failed the node treated the result as "cannot tell" instead of "invalid". Every error a monitor treats as "unknown" is a bypass: fail closed.

Thanks to the Threshold team for the professional handling of this report and clear communication throughout.

Done

Shchepetov