What Is the Primary Risk of Transaction Malleability in Smart Contracts?
The primary risk of transaction malleability, before SegWit, was its potential to break complex smart contract logic, especially those relying on the exact Transaction ID (TXID) of an unconfirmed transaction. If a contract's logic, such as a multi-signature escrow or a payment channel, used the TXID as a unique reference or a pre-signed input, an attacker could malleate the TXID, invalidating the pre-signed transactions or breaking the contract's state transition.
This could lead to a loss of funds or a deadlock in the contract.