fix(abstract-eth,sdk-core): enforce signableHex/serializedTxHex consistency for BSC and XDC (WCI-1398) - #9526
Merged
davidkaplanbitgo merged 3 commits intoAug 26, 2026
Conversation
Contributor
Marzooqa
force-pushed
the
WCI-1398-bsc-xdc-signable-consistency-check
branch
from
August 25, 2026 14:20
85b5d8b to
0e6fa9b
Compare
…stency for BSC and XDC For TSS_VERIFY_USE_SERIALIZED_TX_HEX coins (BSC, XDC), the ECDSA MPCv2 signing flow calls verifyTransaction with serializedTxHex but then signs signableHex. Both values are server-supplied independently, allowing a malicious server to pair a benign serializedTxHex (shown to verify) with a tampered signableHex (what actually gets signed). Adds a CoinWithSignableConsistency interface to sdk-core, implemented by AbstractEthLikeNewCoins. After verifyTransaction succeeds, ecdsaMPCv2 calls assertSignableConsistency to derive the expected signableHex from serializedTxHex and throw InvalidTransactionError if they diverge. WCI-1398 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> TICKET: WCI-1398
Marzooqa
force-pushed
the
WCI-1398-bsc-xdc-signable-consistency-check
branch
from
August 26, 2026 10:23
0e6fa9b to
b29025d
Compare
Marzooqa
marked this pull request as ready for review
August 26, 2026 12:25
parasgarg-bitgo
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
For BSC and XDC, the ECDSA MPCv2 signing flow verifies
serializedTxHexbut signssignableHex— both are independent server-supplied fields. This PR adds a consistency check that locally derives the expectedsignableHexfromserializedTxHexand throws before signing if they diverge.Changes
CoinWithSignableConsistencyinterface and type guard tosdk-coreAbstractEthLikeNewCoinsimplementsassertSignableConsistencyusingTransactionFactory.fromSerializedData, handling both EIP-1559 and legacy EIP-155 transactionsecdsaMPCv2.tscalls the check afterverifyTransactionsucceeds in theTSS_VERIFY_USE_SERIALIZED_TX_HEXbranchTest plan
signableHexthrows — BSC + XDC@wp_api_tbscand@wp_api_txdcpassed