Commit 63ddf05
fix(tss): require txParams with recipients for TSS tx signing
Without this guard, a compromised BitGo API could modify
signableHex to redirect funds to an attacker address. The
client SDK would sign without detecting the tampering because
verifyTransaction() received an empty recipients array and
skipped address/amount verification.
- Throw early in signRequestBase() when txParams.recipients is
absent or empty for RequestType.tx (ecdsaMPCv2 and ecdsa)
- Remove the `|| { recipients: [] }` silent fallback so
verifyTransaction() always receives caller-supplied params
- Add optional txParams to recreateTxRequest() and propagate
it to signTxRequest() to keep the pending-approval re-sign
path working
- Extract recipients from pendingApproval.info.transactionRequest
in recreateAndSignTSSTransaction() so that path passes the guard
- Update existing tests to supply txParams with recipients and
add negative tests for missing/empty recipients cases
Ticket: WAL-375
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent e3b914b commit 63ddf05
File tree
7 files changed
+90
-8
lines changed- modules
- bitgo/test/v2/unit/internal/tssUtils
- ecdsaMPCv2
- sdk-core/src/bitgo
- pendingApproval
- utils/tss
- ecdsa
7 files changed
+90
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
| 750 | + | |
750 | 751 | | |
751 | 752 | | |
752 | 753 | | |
| |||
764 | 765 | | |
765 | 766 | | |
766 | 767 | | |
| 768 | + | |
767 | 769 | | |
768 | 770 | | |
769 | 771 | | |
770 | 772 | | |
771 | 773 | | |
772 | 774 | | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
773 | 804 | | |
774 | 805 | | |
775 | 806 | | |
| |||
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
| |||
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
| 219 | + | |
218 | 220 | | |
219 | 221 | | |
220 | 222 | | |
| |||
236 | 238 | | |
237 | 239 | | |
238 | 240 | | |
| 241 | + | |
239 | 242 | | |
240 | 243 | | |
241 | 244 | | |
| |||
257 | 260 | | |
258 | 261 | | |
259 | 262 | | |
| 263 | + | |
260 | 264 | | |
261 | 265 | | |
262 | 266 | | |
| |||
277 | 281 | | |
278 | 282 | | |
279 | 283 | | |
| 284 | + | |
280 | 285 | | |
281 | 286 | | |
282 | 287 | | |
283 | 288 | | |
284 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
285 | 315 | | |
286 | 316 | | |
287 | 317 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
250 | 252 | | |
251 | 253 | | |
252 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
533 | 534 | | |
534 | 535 | | |
535 | 536 | | |
536 | | - | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
537 | 543 | | |
538 | 544 | | |
539 | 545 | | |
540 | | - | |
| 546 | + | |
541 | 547 | | |
542 | 548 | | |
543 | 549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
751 | | - | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
752 | 757 | | |
753 | 758 | | |
754 | 759 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
748 | 752 | | |
749 | 753 | | |
750 | 754 | | |
751 | 755 | | |
752 | 756 | | |
753 | 757 | | |
754 | 758 | | |
755 | | - | |
| 759 | + | |
756 | 760 | | |
757 | 761 | | |
758 | 762 | | |
759 | 763 | | |
760 | 764 | | |
761 | 765 | | |
762 | | - | |
| 766 | + | |
763 | 767 | | |
764 | 768 | | |
765 | 769 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
736 | 736 | | |
737 | 737 | | |
738 | 738 | | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
739 | 743 | | |
740 | 744 | | |
741 | 745 | | |
742 | 746 | | |
743 | 747 | | |
744 | 748 | | |
745 | 749 | | |
746 | | - | |
| 750 | + | |
747 | 751 | | |
748 | 752 | | |
749 | 753 | | |
750 | 754 | | |
751 | 755 | | |
752 | 756 | | |
753 | | - | |
| 757 | + | |
754 | 758 | | |
755 | 759 | | |
756 | 760 | | |
| |||
0 commit comments