The MadBrooks Sage

Transaction Malleability: When Transaction IDs Can Change

Sep 21, 2026 · 9:15 AM CT · 9:13 · The MadBrooks Sage | Transaction Malleability | When Transaction IDs Can Change | ft. EDGE | 9/21/2026

Why certain blockchain implementations allow transaction hashes to be modified before confirmation without invalidating signatures. We'll cover the technical causes, historical exploits like Mt. Gox, and fixes like SegWit.

Apple Podcasts Spotify Pocket Casts RSS

Transcript

Transaction malleability nearly destroyed the largest Bitcoin exchange in the world, and most people still don't understand what actually happened.

SAGE: Edge, let's start with what transaction malleability actually is, because the term sounds more complicated than the concept. What's happening under the hood when we say a transaction ID can change?

EDGE: Think of it this way. When you sign a Bitcoin transaction, you're cryptographically signing the essential parts—where the coins are coming from, where they're going, how much. That signature proves you authorized the movement. But the transaction ID, the hash that identifies that transaction, is calculated from the entire transaction data, including some parts that can be modified without breaking your signature. It's like signing a check for a hundred dollars to a specific person, but someone can change the check number without invalidating your signature. The payment is still valid, still goes through, but the identifier changed.

SAGE: So the signature remains valid, the economic outcome is identical, but the fingerprint of that transaction in the system has shifted. Walk me through what parts of a transaction could be modified. What's actually malleable here?

EDGE: In the original Bitcoin implementation, the main vulnerability was in the signature encoding itself. Digital signatures in Bitcoin use something called DER encoding, and there's flexibility in how you represent the same mathematical signature. You could take a valid signature and encode it slightly differently, or you could modify the script in certain ways, and you'd get a different transaction hash but the signature would still verify. There were also issues with how signature operations could be padded or how certain opcodes could be manipulated. None of these changes affected who was paying whom or how much, but they changed the transaction ID that everyone uses to track whether a payment went through.

SAGE: And this is where Mt. Gox comes in. They were the dominant exchange in twenty thirteen, twenty fourteen, handling something like seventy percent of all Bitcoin trading. What was their specific vulnerability to this malleability issue?

EDGE: Mt. Gox's withdrawal system had a fatal flaw in its accounting. When you requested a Bitcoin withdrawal, their system would create a transaction, broadcast it to the network, and record that transaction ID in their database as pending. They'd wait to see that transaction ID get confirmed before marking your withdrawal complete. But attackers realized they could take that broadcasted transaction, modify it using malleability tricks to change its transaction ID, and broadcast the modified version. If the modified version got mined into a block instead of the original, the Bitcoin would still go to the same address, the withdrawal would complete successfully, but Mt. Gox's database would never see its original transaction ID confirmed. Their system would think the withdrawal failed. Users would complain they didn't receive their Bitcoin, Mt. Gox would see no confirmation of their transaction ID, and they'd send the coins again. Same coins, paid twice.

SAGE: So the actual Bitcoin moved correctly on the blockchain, but Mt. Gox's internal ledger was tracking the wrong identifier. They were essentially flying blind, trusting transaction IDs before confirmation rather than watching addresses and amounts. How much did they lose to this?

EDGE: Mt. Gox claimed they lost around eight hundred and fifty thousand Bitcoin total, though only a portion was attributed to transaction malleability. The exact numbers are still disputed because their accounting was catastrophically bad in multiple ways. But the malleability issue exposed something crucial about how exchanges and services were building on top of Bitcoin. Many of them assumed transaction IDs were immutable before confirmation. They built entire reconciliation systems around that assumption. When that assumption broke, their accounting broke. It wasn't really a Bitcoin protocol flaw in the sense that funds could be stolen or double spent in the traditional sense. It was a gap between how the protocol actually worked and how people thought it worked.

SAGE: This gets at something deeper about building on blockchain infrastructure. You can't treat pre-confirmation state as settled state. But even beyond exchanges, what other systems were vulnerable to malleability?

EDGE: Any system that relied on transaction IDs before confirmation had problems. Lightning Network development, for instance, was significantly complicated by malleability. In Lightning, you're creating chains of transactions where later transactions spend outputs from earlier ones. If an earlier transaction's ID changes before confirmation, all the dependent transactions become invalid because they're referencing the wrong transaction ID. You couldn't safely build these time-locked, multi-stage contracts without solving malleability first. Payment channels, atomic swaps, any sophisticated smart contract that required multiple linked transactions faced this problem. Malleability wasn't just an accounting headache, it was a fundamental barrier to building second-layer protocols.

SAGE: Which brings us to Segregated Witness, SegWit. This was activated in twenty seventeen after years of debate. How did SegWit solve transaction malleability, and what was the core architectural change?

EDGE: SegWit did something elegant. It separated, or segregated, the signature data from the transaction data used to calculate the transaction ID. The witness, meaning the signature and script data that proves authorization, got moved into a separate structure. The transaction ID is now calculated only from the non-witness data, the parts that specify inputs, outputs, and amounts. Since the signature isn't included in the hash anymore, manipulating how that signature is encoded can't change the transaction ID. The signature still validates the transaction, but it's no longer part of the identifier. It's like moving your signature on that check to a separate verification slip that doesn't affect the check number.

SAGE: And this unlocked Lightning Network and other second-layer development in a practical way. But SegWit was controversial, not just technically but politically within the Bitcoin community. Why did something that fixed a clear bug become so contentious?

EDGE: Because it wasn't just a bug fix, it was implemented as a soft fork that changed Bitcoin's block structure, and it became a proxy battle for Bitcoin's scaling roadmap. Some factions wanted larger blocks to increase transaction throughput on the base layer. SegWit was presented as part of a different scaling approach, optimizing transaction structure and enabling second layers like Lightning rather than simply increasing block size. The technical merits of fixing malleability got caught up in a broader ideological fight about what Bitcoin should become. There were also concerns about complexity, about how SegWit introduced a new transaction format and whether that represented too much change to Bitcoin's conservative engineering culture. Looking back, fixing malleability was clearly necessary. But the way it was packaged with other changes and the political context around scaling made it divisive.

SAGE: Are there malleability issues in other blockchain architectures, or did Bitcoin's specific implementation create this problem?

EDGE: It shows up in different forms across different systems. Ethereum doesn't have the same signature malleability issues because it uses a different signature scheme and calculates transaction hashes differently. But other chains that forked from Bitcoin or used similar UTXO models had to address it. The broader lesson is about the relationship between transaction identifiers and transaction validity. Any system where those two things aren't tightly coupled faces potential malleability issues. It's a reminder that the obvious way to design something isn't always robust. Using the hash of the entire transaction including signatures as the identifier seems logical until you realize signatures can have multiple valid representations.

SAGE: Last thing. For someone building on blockchain infrastructure today, what's the takeaway from the malleability saga beyond just the technical fix?

EDGE: Never trust pre-confirmation state for anything that matters financially. Watch addresses and amounts, not transaction IDs, until you have confirmations. More broadly, understand that blockchain infrastructure is still young, and the gap between how protocols actually work and how people think they work is where catastrophic failures happen. Mt. Gox didn't fail because of a protocol flaw. They failed because they built a system on faulty assumptions about protocol guarantees. Every blockchain has these subtle properties that aren't obvious until they bite you. The question isn't whether your assumptions about how the system works are reasonable. The question is whether they're correct. And the only way to know is to actually read the code and understand the protocol at a technical level, not just conceptually.

SAGE: See you Tuesday. Transaction IDs are not transactions, they're pointers to transactions, and pointers can move.

← Dust Attacks: Tracking Privacy Through Tiny TransactionsDifficulty Adjustment: How Blockchains Keep Consistent… →

AI generated. Not financial advice.