<p>All transaction data is committed to the WTXID, unlike in the case of TXID's.</p>

<p>Malleability is found in the unlocking script/data of a transaction. It is malleable, because is not committed to the signature (circular dependency). </p>

<p>Sources of TX Malleability:</p>

<ul>
<li>Signature Malleability</li>
<li>Input Script Malleability </li>
</ul>

<p>See <code>BIP62</code> for a great overview of TX malleability sources.</p>

<p>The unlocking script data is found in input scripts (non-witness tx's) and witnesses (witness tx's). For a witness transaction, if the witness is modified in a way that doesn't affect validity, this necessarily changes the resulting WTXID.</p>

<p>The TXID's of witness transactions are not malleable, because the input script is empty and witness data is stripped for its TXID derivation. Transactions are not referenced by WTXID, but by TXID's.</p>

CC BY-SA 4.0
2019-01-15T16:03:04.723Z
I should mention, even if only TXIDs are committed to block headers (merkle root), WTXIDs are committed to a coinbase output (witness root), so that once confirmed, none of the witness transaction data cannot be modified.
James C.
CC BY-SA 4.0
2019-01-15T15:51:17.540Z
2019-01-15T15:51:17.540Z
James C.
<p>To add to James' answer, the &quot;segregated&quot; witness can be switched out for an alternative valid witness which changes the wtxid but not the txid. The txid stays the same if you change the witness as the witness is not hashed for the txid but is for wtxid.</p>
<p>Thanks to Gloria Zhao for providing this graphic from <a href="https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki#hashes" rel="nofollow noreferrer">BIP144</a> during a Bitcoin Core PR <a href="https://bitcoincore.reviews/22261" rel="nofollow noreferrer">review club</a> in June 2021.</p>
<p><a href="https://i.sstatic.net/IcbCC.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IcbCC.png" alt="txid and wtxid" /></a></p>

CC BY-SA 4.0
2021-07-03T11:22:23.077Z
2023-03-04T18:21:18.557Z
2023-03-04T18:21:18.557Z
Michael Folkson
<p>Why is the <strong>wtxid</strong> considered malleable since the transaction is unconfirmed?
How can a third-party modify it?</p>

<unconfirmed-transactions><segregated-witness><transaction-malleability><witness-data>
Why is the wtxid considered malleable?
dcfg
# Why is the wtxid considered malleable?

(Asked by: username_0 on 2019-01-15)

Why is the **wtxid** considered malleable since the transaction is unconfirmed?
How can a third-party modify it?

**Tags:** unconfirmed-transactions, segregated-witness, transaction-malleability, witness-data


---

## 2 answers

### Answer by username_1 on 2019-01-15. Score: 2 | Accepted answer

All transaction data is committed to the WTXID, unlike in the case of TXID's.

Malleability is found in the unlocking script/data of a transaction. It is malleable, because is not committed to the signature (circular dependency).

Sources of TX Malleability:

* Signature Malleability
* Input Script Malleability

See `BIP62` for a great overview of TX malleability sources.

The unlocking script data is found in input scripts (non-witness tx's) and witnesses (witness tx's). For a witness transaction, if the witness is modified in a way that doesn't affect validity, this necessarily changes the resulting WTXID.

The TXID's of witness transactions are not malleable, because the input script is empty and witness data is stripped for its TXID derivation. Transactions are not referenced by WTXID, but by TXID's.

> **Comments:**
> **username_1**: I should mention, even if only TXIDs are committed to block headers (merkle root), WTXIDs are committed to a coinbase output (witness root), so that once confirmed, none of the witness transaction data cannot be modified.  

---

### Answer by username_2 on 2021-07-03. Score: 2

To add to James' answer, the "segregated" witness can be switched out for an alternative valid witness which changes the wtxid but not the txid. The txid stays the same if you change the witness as the witness is not hashed for the txid but is for wtxid.

Thanks to Gloria Zhao for providing this graphic from [BIP144](https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki#hashes) during a Bitcoin Core PR [review club](https://bitcoincore.reviews/22261) in June 2021.

[![txid and wtxid](https://i.sstatic.net/IcbCC.png)](https://i.sstatic.net/IcbCC.png)


---

