Description:
Summary
Found a potential signature replay vulnerability in the domain hash generation. If a single pubkey controls multiple smart wallets, signatures can be replayed across wallets because the domain hash doesn't include the wallet address.
The Issue
The current domain hash doesn't bind signatures to a specific wallet. If a user deploys multiple smart wallets with the same pubkey, a valid signature for one wallet can be replayed on another.
Suggested Fix
Add contract-caller to the domain hash:
(define-read-only (get-domain-hash)
(sha256 (unwrap-panic (to-consensus-buff? {
name: "smart-wallet-standard",
version: "1.0.0",
chain-id: chain-id,
wallet: contract-caller, ;; <-- Add this
})))
)
This ensures each signature is bound to a specific wallet contract.
Proof of Concept
Mainnet txs:
Credit: Rapha.btc | fak.fun | https://pillarbtc.com/
Description:
Summary
Found a potential signature replay vulnerability in the domain hash generation. If a single pubkey controls multiple smart wallets, signatures can be replayed across wallets because the domain hash doesn't include the wallet address.
The Issue
The current domain hash doesn't bind signatures to a specific wallet. If a user deploys multiple smart wallets with the same pubkey, a valid signature for one wallet can be replayed on another.
Suggested Fix
Add
contract-callerto the domain hash:This ensures each signature is bound to a specific wallet contract.
Proof of Concept
Mainnet txs:
Credit: Rapha.btc | fak.fun | https://pillarbtc.com/