← Back to Glossary

Malleability

Malleability is the ability of a third party to alter a bitcoin transaction's identifier, its txid, without invalidating the transaction, by tweaking how its signatures are encoded before it confirms. The problem was largely eliminated in August 2017, when Segregated Witness moved signature data out of the portion of the transaction that is hashed to produce the txid.

Why it matters

Any system that tracked payments by txid could be confused by a mutated duplicate confirming under a different identifier. Mt. Gox famously blamed malleability for losses before its 2014 collapse, a claim later investigation found wanting, but the episode made the flaw notorious. More fundamentally, malleability blocked protocols built from chains of unsigned or unconfirmed transactions, because a child transaction references its parent by txid, and a mutated parent orphans the child.

Fixing it was therefore a prerequisite for the Lightning Network, whose channels depend on pre-signed transactions that spend outputs which do not yet exist on-chain.

How it works

ECDSA signatures admit multiple valid encodings of the same mathematical signature, so a relay node could rewrite one and change the transaction's hash. SegWit's fix was structural: witness data is committed separately, so the txid covers only the transaction's economic content. Transactions using SegWit inputs therefore have identifiers nobody can mutate, which is why virtually all modern wallets use them.

Ready to convert your gold to Bitcoin?

Get Your Free Kit →