-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable eth_sign by default #5676
Comments
Hey team! Please add your planning poker estimate with Zenhub @Fatxx @tommasini @jpcloureiro |
Please add your planning poker estimate with Zenhub @chrisleewilcox |
@bschorchit What would the user interaction look like when eth_sign is disabled and a Dapp attempts to make that RPC call? Does it fail silently, gracefully, or will a user see an alert? It looks like Extension silently fails, can you confirm? |
Great question, Cal. It fails silently to the user and this is an intended behavior. |
cc @yanrong-chen for design support |
@holantonela |
On request for DevEx involvement here..
Would it be that problematic to only offer the enabling of eth_sign on Extension? |
Confirmed with @rekmarks that we should aim for parity with Extension because the effort to implement the mobile UI is considered reasonable for DevEx (still react-based with pre-existing design components). |
Description
From Harry:
After looking at various phishing kits (and de-obfuscating), there are enormous trends between different kits that they all abuse
eth_sign
to ask users to inadvertently sign a transaction (as MetaMask UI is opaque to an on-chain transaction being signed). You can read more about the attack here.@409H'd estimate that the abuse of
eth_sign
is near equal to the abuse of Wyvern and Seaport contracts in a manner to steal NFTs through creating orders for 0 eth to a specific beneficiary.In short:
eth_sign
has been consistently abused by phishers/scammers to steal funds and the case may be that only power-users who use very legacy dapps may need to still use eth_sign.eth_sign
by default - throw an ethErrors.rpc.methodNotFound exceptioneth_sign
through "Advanced Settings"RPC Method preferences are stored within
rpcMethodPreferences
in the store state, allow for us to develop this further if someone wants to lock down rpc calls into MetaMask.UI:
Technical Details
Advanced
settings, introduce a new toggle with titleToggle eth_sign requests
and descriptionTurn this on to let dapps request your signature using eth_sign requests. eth_sign is an open-ended signing method that lets you sign an arbitrary hash, making it a dangerous phishing risk. Only sign eth_sign requests if you can read what you are signing and trust the origin of the request.
. This should be the last item on advanced settings page.PreferencesController
. The state should look likedisabledRpcMethodPreferences: {eth_sign: false}
setDisabledRpcMethodPreference(methodName: string, isEnabled: boolean)
RPCMethodMiddleware.ts
and withineth_sign
, check forPreferencesController.state.disabledRpcMethodPreferences.eth_sign
and throw error if feature is disabled. Use errorethErrors.rpc.methodNotSupported()
. Referenceeth_signTransaction
PreferencesController
with controller changesAcceptance Criteria
eth_sign
from a dapp should not work (fails silently)eth_sign
should prompt a signature in the appReferences
Extension's PR: MetaMask/metamask-extension#17308
Figma - https://www.figma.com/file/X5tDiDfJN8IA9TXA1gM95S/Add-option-to-opt-in-(Disable-eth_sign-by-default)?node-id=0%3A1&t=0jFOOCjakJF0NNP5-1
The text was updated successfully, but these errors were encountered: