-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Security: Issue: "[websockets]apis" settings are ignored i.e. "parity_accounts" is not getting disabled i.e. it is possible to invoke "parity_newAccountFromPhrase"! #9490
Comments
Parity UI is authenticated with a token and you must have clicked some authorization at least once when you start it up to let the UI access the node and give separate rights. You should not be able to do a WS call this method without authentication, and from what I read, this holds true. |
Sorry but I don't agree. When I disable an API e.g. "parity_accounts" then it should be disabled no matter what I do. And no I did not click anything. I think this is just a serious security bug. And a backdoor for accessing a node. I will try whether I can access other nodes out there. |
Hi @becke-ch-s0-v1!
Parity UI is using the secure connection, so it can always access all the methods. |
Hi @tomusdrw , |
Since |
Hi @tomusdrw ,
And deleted all node data:
And really this time I was required to generate a token first (before I could proceed to the disclaimers). |
Hi @tomusdrw , |
@becke-ch-s0-v1 indeed the API allows a connection with special "initial" token to prevent a hassle in case you set up your node for the first time. Since the UI is no longer officialy supported, I made a PR to disable that behaviour in #9545 |
Before filing a new issue, please provide the following information.
Your issue description goes here below. Try to include actual vs. expected behavior and steps to reproduce the issue.
My node configuration:
/data/becke-ch--parity-node--s0-v1/configuration/node-config.toml
Has the following value:
And when I start parity as follows:
docker run -ti -v /data/becke-ch--parity-node--s0-v1/:/data/becke-ch--parity-node--s0-v1/ parity/parity:v1.11.8 --chain /data/becke-ch--parity-node--s0-v1/configuration/chain-config.json --config /data/becke-ch--parity-node--s0-v1/configuration/node-config.toml --base-path /data/becke-ch--parity-node--s0-v1/data/ --jsonrpc-interface 172.17.0.2 --ws-interface 172.17.0.2
I expect that the API
parity_accounts
is disabled i.e. it should not be possible to invokeparity_newAccountFromPhrase
!This is actually true for "rpc" i.e. when I call the following:
curl --data '{"method":"parity_newAccountFromPhrase","params":["stylus outing overhand dime radial seducing harmless uselessly evasive tastiness eradicate imperfect","hunter2"],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST 172.17.0.2:8545
I'm getting as expected the error:
{"jsonrpc":"2.0","error":{"code":-32601,"message":"Method not found"},"id":1}
BUT when I start parity-ui as follows:
/tool/parity-ui-0.3.4/parity-ui --ws-interface=172.17.0.2 --ws-port=8546 &
It is for me no problem to create new accounts even this API (parity_accounts) should be blocked!
Therefore I've used wireshark to analyze the websocket traffic and indeed in the background the methods "
parity_phraseToAddress
", "parity_newAccountFromPhrase
" and "parity_setAccountName
" are invoked without any issues!Best regards
Raoul
The text was updated successfully, but these errors were encountered: