From the network. Or, at least as I understand it, Transaction Malleability basically means, that the "final" transaction can have different txid, so you shouldn't rely on it. But you can check if the transaction went through the same way as the bitcoin-qt does it, which is what BTC developer Gregory Maxwell recommends here: