fix(sdk-core): wire resolveEffectiveTxParams into EddsaMPCv2Utils (WCI-1111) - #9394
Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Conversation
Contributor
ralph-bitgo
Bot
force-pushed
the
wci-1111-wire-resolve-effective-tx-params-eddsa
branch
from
July 31, 2026 07:22
4807ac9 to
394740d
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1111-wire-resolve-effective-tx-params-eddsa
branch
2 times, most recently
from
July 31, 2026 07:48
7e84969 to
1da40ae
Compare
ralph-bitgo
Bot
force-pushed
the
wci-1111-wire-resolve-effective-tx-params-eddsa
branch
from
July 31, 2026 07:48
1da40ae to
eaae085
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1111-wire-resolve-effective-tx-params-eddsa
branch
from
July 31, 2026 07:48
eaae085 to
ab7b2e9
Compare
Marzooqa
force-pushed
the
wci-1111-wire-resolve-effective-tx-params-eddsa
branch
from
July 31, 2026 07:53
ab7b2e9 to
63e90fc
Compare
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1111-wire-resolve-effective-tx-params-eddsa
branch
from
July 31, 2026 09:11
63e90fc to
691bdbf
Compare
ralph-bitgo
Bot
force-pushed
the
wci-1111-wire-resolve-effective-tx-params-eddsa
branch
from
July 31, 2026 09:11
691bdbf to
ce54229
Compare
What changed:
- eddsaMPCv2.ts signRequestBase: replaced the vulnerable
`params.txParams || { recipients: [] }` fallback with
`resolveEffectiveTxParams(txRequest, params.txParams, this.baseCoin.getChain())`.
resolveEffectiveTxParams throws InvalidTransactionError when recipients
cannot be resolved and the intent is not a recognised no-recipient type.
- wallet.ts signTransactionTss: removed the EdDSA MPCv2 special-case block
that pre-fetched the txRequest and called txParamsFromIntent before handing
off to signTxRequest. This pre-fetch was introduced to work around the
missing guard; now that resolveEffectiveTxParams owns intent-based
derivation inside signRequestBase (which already fetches the txRequest
when given a string ID), the wallet-layer duplication is redundant.
- Removed the now-unused txParamsFromIntent import from wallet.ts.
- Tests: added resolveEffectiveTxParams guard suite to signTxRequest.ts
covering the stakingAuthorize attack vector (throws), empty-recipient
txParams (throws), allowlisted intentTypes deactivate/consolidate (pass),
intent-sourced recipients (pass), and staking intent with stakingRequestId
(pass).
Why:
Trail of Bits finding TOB-BITGOEDMPC-1 (WCI-1100): the EdDSA MPCv2 re-sign
path silently substituted an empty-recipients object when txParams was absent.
Several coin-level verifyTransaction implementations (SOL, VET, Tempo, TRON)
skip output-matching validation when recipients.length is 0, allowing a
compromised BitGo server to present a malicious txHex that signs without any
client-side validation. ECDSA already used resolveEffectiveTxParams for
fail-closed behaviour (ecdsaMPCv2.ts:958,965 and ecdsa.ts:821,828); this
change ports the same pattern to EdDSA MPCv2. MPCv1 (eddsa.ts) is explicitly
out of scope per ticket WCI-1111.
Ticket: WCI-1111
Session-Id: 1c178dac-6528-4ee7-937d-974216871d68
Task-Id: e91df1ba-6cf4-4b0c-8df2-2588f555481e
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1111-wire-resolve-effective-tx-params-eddsa
branch
from
July 31, 2026 11:40
ce54229 to
0490122
Compare
ralph-bitgo
Bot
force-pushed
the
wci-1111-wire-resolve-effective-tx-params-eddsa
branch
from
July 31, 2026 11:40
0490122 to
e2ca6c4
Compare
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.
What
signRequestBase: replaced the vulnerableparams.txParams || { recipients: [] }fallback withresolveEffectiveTxParams(txRequest, params.txParams, this.baseCoin.getChain()). The function throwsInvalidTransactionErrorwhen recipients cannot be resolved and the intent is not a recognised no-recipient type.signTransactionTss: removed the EdDSA MPCv2 special-case block that pre-fetched the txRequest and calledtxParamsFromIntentbefore handing off tosignTxRequest. That pre-fetch was introduced to work around the missing guard; now thatresolveEffectiveTxParamsowns intent-based derivation insidesignRequestBase(which already fetches the txRequest internally when given a string ID), the wallet-layer duplication is redundant. Removed the now-unusedtxParamsFromIntentimport.resolveEffectiveTxParamsguard suite tosignTxRequest.tscovering:stakingAuthorizeattack vector (no txParams, non-allowlisted intent → throws)txParamswith non-allowlisted intent → throwsdeactivateintentType with no txParams → succeedsconsolidateintentType with no txParams → succeedsstakingRequestIdsignal → succeedsWhy
Trail of Bits finding TOB-BITGOEDMPC-1 (WCI-1100): the EdDSA MPCv2 re-sign path silently substituted an empty-recipients object when
txParamswas absent. Several coin-levelverifyTransactionimplementations (SOL, VET, Tempo, TRON) skip output-matching validation whenrecipients.length === 0, allowing a compromised BitGo server to present a malicioustxHexthat signs without any client-side validation.ECDSA already used
resolveEffectiveTxParamsfor fail-closed behaviour (ecdsaMPCv2.ts:958,965andecdsa.ts:821,828). This PR ports the same pattern to EdDSA MPCv2. MPCv1 (eddsa.ts) is explicitly out of scope per the ticket.Depends on WCI-1110 (base branch
wci-1110-fix-resolve-effective-tx-params-sol), which fixesresolveEffectiveTxParamsto preservetokenNamefor SOL token transfers and adds thedeactivate/delegate/closeAssociatedTokenAccountallowlist entries needed by EdDSA coins.Test plan
signTxRequestthrowsInvalidTransactionErrorforstakingAuthorizeintent with no recipients and no txParamssignTxRequestthrows for emptytxParams.recipientswith non-allowlisted intentsignTxRequestsucceeds fordeactivateandconsolidate(allowlisted no-recipient intents)signTxRequestsucceeds when intent provides recipients and txParams is absentsignTxRequestsucceeds for staking intents withstakingRequestIdTicket: WCI-1111