fix(tss): verify recipients before signing#8539
Merged
mrdanish26 merged 2 commits intomasterfrom Apr 27, 2026
Merged
Conversation
e444156 to
2d64d76
Compare
Contributor
mohammadalfaiyazbitgo
requested changes
Apr 20, 2026
mohammadalfaiyazbitgo
previously approved these changes
Apr 22, 2026
zhongxishen
previously approved these changes
Apr 22, 2026
…x substitution TICKET: WAL-375
a4915fb
2d64d76 to
a4915fb
Compare
a4915fb to
1f55399
Compare
feng-bitgo
approved these changes
Apr 24, 2026
mohammadalfaiyazbitgo
approved these changes
Apr 27, 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.
TICKET: WAL-375
Description
Ensures
verifyTransactionalways receives recipient details before any signing material is sent to BitGo, preventing a compromised API from silently substitutingsignableHexwith attacker-controlled bytes.A
resolveEffectiveTxParams()guard is added to both ECDSA and MPCv2signRequestBase()paths. It resolves recipients from three sources in priority order:txParams.recipients— normal case.txRequest.intent.recipients— fallback for smart-contract interactions (e.g. TemposupplyController) where native ETH amount = 0 sobuildParamsis empty but intent carries the recipients.NO_RECIPIENT_TX_TYPESexemption — types that legitimately carry no recipients;verifyTransactionhandles validation internally for these. ThrowsInvalidTransactionErrorif none of the above apply.A database query against
marts.wallet_platform.bitgo2__transaction_requestidentified all intent types whereINTENT:recipients IS NULL OR ARRAY_SIZE(INTENT:recipients) = 0. Two ECDSA-path types with significantrecord counts were missing from the exemption list:
Both have been added to NO_RECIPIENT_TX_TYPES and the abstractEthLikeNewCoins.ts bypass list.
NO_RECIPIENT_TX_TYPES (8 types)
acceleration,fillNonce,transferToken,tokenApproval,consolidate,bridgeFundsenableTokencustomTxpopulateIntent()server-side; must be consistent at signingBoth
recipientUtils.tsand the inline bypass list inabstractEthLikeNewCoins.ts verifyTssTransactionare kept in sync.A previous PR (#8462) hard-threw on any empty recipients, breaking cases 2 and 3. It was reverted in #8538. This PR supersedes it.
Testing
New unit tests —
tss/recipientUtils.ts(16 tests):txParams.recipientstakes priority over intenttxParamsis empty or undefinedUpdated integration tests —
ecdsaMPCv2/signTxRequest.ts(13 tests):.should.not.be.rejectedWith()assertions with nock-backedisDone()assertions that prove signing completes end-to-endenableTokenandcustomTxexemptions