# Authorization Bypass in Starknet Snap via enableAuthorize parameter leads to unauthorized transaction signing

Starknet Snap trusted a caller-supplied enableAuthorize flag, so any website could set it false and sign messages/transactions without the MetaMask confirmation dialog.

- Payout: $350
- Severity: medium
- Program: MetaMask
- Found by: aszx87410
- Disclosed: 2026-03-13
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/3507241
- Library page: https://bugbountylibrary.com/r/h1%3A3507241
- Tags: area:web3 domain:web3 impact:funds-loss impact:integrity kind:bounty platform:hackerone sev:medium tech:evm technique:source-review vuln:auth-bypass vuln:business-logic

**Target:** Starknet Snap RPC sign-message handler
**Root cause:** The signMessage RPC reads enableAuthorize from caller-supplied params and only renders the confirmation UI when it is truthy; a dapp setting it false skips authorization entirely and proceeds to sign with the account private key.
**Steps:**
1. Visit https://snaps.consensys.io/starknet and click "Connect with MetaMask" to install the StarkNet Snap
2. Host `exp-starknet.html` on localhost:5555
3. Visit the page and click `start PoC`
4. Accept the connection request
5. Observe that the signMessage is shown in the page without user approval
**How found:** Code review of sign-message.ts spotted the TODO comment noting enableAuthorize should default to true, revealing the flag was caller-controlled and gated the confirmation UI.
**Exploitation:** A malicious site connects to the Starknet Snap and invokes signMessage with `enableAuthorize: false`, causing the snap to sign arbitrary typed data with the user's private key without approval, enabling forged signatures/transactions and potential asset theft.
**Insight:** Snap/RPC handlers that accept a caller-supplied 'skip confirmation' or 'authorize' boolean are a direct auth bypass — grep wallet/snap RPC params for flags that gate UI rendering rather than being enforced server-side.

