AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 37 Monero

fix: convert decoded JSON list instead of casting in solana_signAllTransactions (#3671)

Public commit record

What the developer wrote

Authored by KShot

93/100 · Strong
fix: convert decoded JSON list instead of casting in solana_signAllTransactions (#3671)

params['transactions'] arrives as decoded JSON (List<dynamic>), so the
hard cast 'as List<String>' threw a TypeError on every
solana_signAllTransactions request, which the handler mapped to
MALFORMED_REQUEST_PARAMS after the user had already approved.
Convert with List<String>.from(... as List<dynamic>) instead — the same
pattern already used for decoded JSON in lib/buy/buy_quote.dart.
Malformed (non-string) elements still throw inside the same try block,
so invalid requests are still rejected as malformed.

Fixes #3659
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a bug in Cake Wallet's Solana WalletConnect feature. When a user approved signing multiple Solana transactions, the app incorrectly tried to force the incoming transaction list into a specific Dart type (List<String>), but the data arrived as a generic decoded JSON list (List<dynamic>). This caused a TypeError every time, which the app then reported to the connected dApp as 'MALFORMED_REQUEST_PARAMS' even though the user had already approved. The fix safely converts the list to the expected string type instead of hard-casting it, restoring normal functionality for multi-transaction signing requests.

Recommended action

Treat as a functional bug fix with minor security relevance. Review whether other WalletConnect chain service handlers use similar unsafe casts on decoded JSON params and apply the same List<T>.from / Map<T>.from conversion pattern. Verify that user-approval flows do not occur before robust parameter validation for transaction requests.

Security signals we found

01

Type confusion / unsafe cast in request handler

02

Error-handling path maps implementation TypeError to MALFORMED_REQUEST_PARAMS

03

User approval occurs before parameter validation/casting failure

04

Fixes a reported issue (#3659) causing legitimate multi-transaction signing to fail

05

No input sanitization change: invalid (non-string) elements still throw and are rejected

Risk score

Why this scored 37/100

Our methodology →
Potential impact 8/30
Exploitability 5/25
Stealth signal 6/15
Affected reach 7/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.