{"id":"XE-0933","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":13,"title":"SDK toAddress accepts any 64-hex with no checksum so a typo destination is silent","area":"sdk-docs-web","claimed_tier":"minor","assessed_tier":null,"verdict":null,"duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":null,"status":"triaging","closed_reason":null,"github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-06T18:44:49.067937+00:00","updated_at":"2026-11-08T20:17:41.885067+00:00","source_created_at":null,"told_at":"2026-11-08T20:18:46.791184+00:00","status_changed_at":"2026-11-08T20:18:19.159276+00:00","url":"https://bounty.xe.network/XE-0933","body":"## Summary\r\ntoAddress is the SDK gate that every send and lease destination is supposed to pass before the wallet will sign. At sdk/src/types.ts:24-35 it only runs assertHex64 (/^[0-9a-f]{64}$/) and never checksums or compares against a derived address, so two adjacent hex characters swapped still pass. A derived control address is accepted, and the swapped-nibble form of that same address is also accepted and returned unchanged. Wallet.create plus toAddress on user-typed hex is the ordinary send path. GitHub #47 is rate limit per peer ID; this is a client-side destination check the SDK never does.\r\n\r\n## Affected components\r\nsdk/src/types.ts:24-35 toAddress (assertHex64 only, no checksum or derived-address compare) at sdk 0dbc92ecff709bee79768e4e37788c682a0f4525.\r\n\r\n## Impact\r\nA single mistyped pair of hex characters sends the amount to an address nobody holds. The SDK will sign and submit it. Worst case is total loss of that send; there is no later checksum to bounce it.\r\n\r\n## PoC\r\n\r\n```javascript\r\n#!/usr/bin/env node\r\n/** A4 — SDK addresses carry no checksum; a swapped-hex destination is accepted. */\r\nimport { toAddress, deriveAddress, Wallet } from './sdk.mjs'\r\n\r\nconst PIN = '0dbc92ecff709bee79768e4e37788c682a0f4525'\r\nconsole.log(`PROVENANCE: sdk=${PIN} file=poc/round3/a4_address_checksum.mjs`)\r\n\r\nconst w = Wallet.create()\r\nconst good = w.address\r\nconsole.log(`CONTROL derived address=${good} toAddress(good) ok`)\r\nconst again = toAddress(good)\r\nif (again !== good) throw new Error('toAddress rejected a derived address')\r\n\r\nconst swapped = good.slice(0, 2) + good[3] + good[2] + good.slice(4)\r\nconsole.log(`ATTACK swapped[2:4] ${good.slice(2, 4)} -> ${swapped.slice(2, 4)} dest=${swapped}`)\r\n\r\nlet accepted = false\r\nlet err = ''\r\ntry {\r\n  const a = toAddress(swapped)\r\n  accepted = a === swapped\r\n  console.log(`ATTACK toAddress(swapped)=${a}`)\r\n} catch (e) {\r\n  err = String(e)\r\n  console.log(`ATTACK toAddress threw ${err}`)\r\n}\r\n\r\nconst stillHex64 = /^[0-9a-f]{64}$/.test(swapped)\r\nconst different = swapped !== good\r\nif (accepted && stillHex64 && different) {\r\n  console.log('PASS: swapped-hex destination accepted by toAddress; CONTROL derived address also accepted')\r\n  console.log('VERDICT=CONFIRMED')\r\n  process.exit(0)\r\n}\r\nconsole.log(`KILL: accepted=${accepted} err=${err}`)\r\nconsole.log('VERDICT=KILLED')\r\nprocess.exit(0)\r\n```\r\n\r\n```\r\nATTACK swapped[2:4] 4a -> a4 dest=18a477f7618d020c4fb7aedc3f610a472e7ba9f06537d21276ac82b3bde6e8c6\r\nATTACK toAddress(swapped)=18a477f7618d020c4fb7aedc3f610a472e7ba9f06537d21276ac82b3bde6e8c6\r\nPASS: swapped-hex destination accepted by toAddress\r\n```\r\n\r\n## Suggested fix\r\nChecksum the 64-hex, or require it to match a derived address, before toAddress returns. Reject a destination that is only well-formed hex.\r\n---","patch_refs":[],"thread":[{"id":1097,"source":"desk","source_ref":"reply:646","author":"Joseph Denne","team":true,"body":"Thanks for raising this. The SDK accepts the address format the protocol currently defines, which has no checksum; whether to introduce a checksummed encoding is a design question we have recorded for the team to decide. We will update https://bounty.xe.network/XE-0933 with the outcome.","created_at":"2026-11-08T20:17:41.885067+00:00"}]}