Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

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

Closed
@becke-ch-s0-v1

Description

@becke-ch-s0-v1

Before filing a new issue, please provide the following information.

  • Parity Ethereum version: 1.11.8
  • Operating system: Linux - Ubuntu 18.04.1 LTS
  • Installation: Docker - parity/parity:v1.11.8
  • Fully synchronized: yes
  • Network: private PoA network - "networkID" : "0x777"
  • Restarted: yes

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:

[network]
bootnodes = ["enode://8aa082af49915716b275cc9ab16e1b2d57a67ab8182490fafb9b0b4b4f9f87eee0731e70f5c42f1f1da3e07893d7ed1f43f5f26d9cdec9d280e49111071195cd@172.17.0.2:30303"]
[rpc]
apis = ["web3", "eth", "pubsub", "net", "shh", "shh_pubsub"]
[websockets]
apis = ["web3", "eth", "pubsub", "net", "shh", "shh_pubsub"]

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 invoke parity_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!

Frame 829: 240 bytes on wire (1920 bits), 240 bytes captured (1920 bits) on interface 0
{"id":317,"jsonrpc":"2.0","method":"parity_phraseToAddress","params":["perm luxurious saint dismantle flanked harmonics speed litmus eggnog unwound droop conjoined"]}

Frame 830: 148 bytes on wire (1184 bits), 148 bytes captured (1184 bits) on interface 0
{"jsonrpc":"2.0","result":"0x00361ea865dcc740a0d9e3ed2543c340ebc583d8","id":317}

Frame 832: 256 bytes on wire (2048 bits), 256 bytes captured (2048 bits) on interface 0
{"id":318,"jsonrpc":"2.0","method":"parity_newAccountFromPhrase","params":["perm luxurious saint dismantle flanked harmonics speed litmus eggnog unwound droop conjoined","eo..."]}

Frame 834: 148 bytes on wire (1184 bits), 148 bytes captured (1184 bits) on interface 0
{"jsonrpc":"2.0","result":"0x00361ea865dcc740a0d9e3ed2543c340ebc583d8","id":318}

Frame 835: 195 bytes on wire (1560 bits), 195 bytes captured (1560 bits) on interface 0
{"id":319,"jsonrpc":"2.0","method":"parity_setAccountName","params":["0x00361ea865dcc740a0d9e3ed2543c340ebc583d8","test8"]}

Frame 837: 108 bytes on wire (864 bits), 108 bytes captured (864 bits) on interface 0
{"jsonrpc":"2.0","result":true,"id":319}

Best regards
Raoul

Metadata

Metadata

Assignees

No one assigned

    Labels

    M2-config 📂Chain specifications and node configurations.Z1-question 🙋‍♀️Issue is a question. Closer should answer.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions