Skip to content

Verify signatures before bumping a transaction #352

Description

@LeoComandini

When bumping a transaction, one may assume that its outputs were previously confirmed by the user.
However a malicious server can tweak unconfirmed transactions so that bumping them will result in sending the funds elsewhere.

Alice broadcasts tx A, in1 -> out1, which won't be confirmed.
Alice restores her wallet.
Server returns tx B, in1 -> out2, instead of tx A.
Alice bumps tx B, but instead of sending funds to out1, funds are sent to out2.

A possible solution consists in verifying the signatures of the transaction to be replaced.
For instance, unless unusual sighashes were used, tx B will fail verification, while tx A will pass.

This attack may be relevant for wallets relying on Electrum servers.
Although in most cases (I assume) the transaction is persisted when it's sent, so this attack is not viable, IMO verifying signatures before bumping is still worth the performance penalty.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions