fix(sdk-core): enforce recipient verification in EdDSA TSS signing#9071
Open
mrdanish26 wants to merge 1 commit into
Open
fix(sdk-core): enforce recipient verification in EdDSA TSS signing#9071mrdanish26 wants to merge 1 commit into
mrdanish26 wants to merge 1 commit into
Conversation
5c3c229 to
4a14137
Compare
mohammadalfaiyazbitgo
left a comment
Contributor
There was a problem hiding this comment.
lgtm, but we should add some unit tests
089706d to
9da68df
Compare
mohammadalfaiyazbitgo
previously approved these changes
Jun 19, 2026
9da68df to
077e837
Compare
077e837 to
9c7bd6e
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.
TICKET: WCN-196
Problem
EdDSA TSS signing paths have no recipient verification before signing:
eddsa.ts (MPC v1): No
verifyTransactioncall at all. After resolving theunsigned tx, the code proceeds directly to MPC signing rounds with zero verification
that the transaction recipients match the intent.
eddsaMPCv2.ts (MPC v2): Has a
verifyTransactioncall but usesparams.txParams || { recipients: [] }, which always falls back to an emptyrecipients array — making the recipient check in
verifyTransactiona no-op.This means an attacker who can manipulate the txPrebuild (the actual transaction bytes)
can substitute different recipient addresses without detection on any EdDSA coin
(SOL, ADA, SUI, TON, DOT, APT, NEAR, CANTON, IOTA, TAO).
This is the EdDSA counterpart to the ECDSA fix in #8924.
Fix
eddsa.ts: Add
verifyTransactioncall withresolveEffectiveTxParamsto resolverecipients from
txRequest.intent(server-side truth) and verify them against thetxPrebuild before signing.
eddsaMPCv2.ts: Replace
params.txParams || { recipients: [] }withresolveEffectiveTxParams(txRequest, params.txParams)so the existingverifyTransactioncall receives actual recipients for comparison.recipientUtils.ts: Add EdDSA-specific no-recipient transaction types to
NO_RECIPIENT_TX_TYPES:closeAssociatedTokenAccount(SOL),voteDelegation(ADA),transferAcknowledge(CANTON).Verification
recipientUtilsunit tests passing (12/12).