Skip to content

Security policy ​

Cinder executes untrusted input (blocks, transactions, witnesses) and talks to untrusted parties (P2P peers, JSON-RPC clients). Consensus differences, crashes, hangs or memory-safety bugs reachable from that input are security issues.

Reporting ​

Please do not open a public issue for a vulnerability. Report it privately by email to [email protected], or through GitHub's Report a vulnerability button on the repository's Security tab when the repository is public. Include the input that triggers it and the observed behaviour.

You can expect an acknowledgement within 72 hours. We will agree on a disclosure timeline with you. Please keep details private until a fix is released.

Scope ​

  • src/: the node (cinder), in particular what peers and RPC clients can reach: RLPx and discovery packets, eth messages, JSON-RPC requests, and the tools that process untrusted data (poc-exec, cinder-p2p-probe).
  • Vendored libraries in deps/ are in scope when the issue is in how Cinder uses them. Also report issues inside them to their upstream project.

Status ​

Cinder is pre-1.0 and not yet a complete node. Do not use it to secure funds or as your only source of truth for chain state. The JSON-RPC API has no authentication: keep it on localhost (the default).

For operators ​

Cinder is alpha software. Do not use it to secure funds. This section tells you how to limit the risk when you run the node. The examples use placeholders: DIR is the database directory and JWT_FILE is the JWT secret file.

The Engine API and the JWT secret ​

The Engine API is the port of the consensus client. It controls the chain of the node. Every request must have a valid token, signed with the JWT secret (HS256). For the token rules, read Engine API.

  • Make a new secret of 32 random bytes in hex. Do not copy a secret from an example or from a different machine.

    bash
    openssl rand -hex 32 > JWT_FILE
    chmod 600 JWT_FILE
  • Give the same file to Cinder (--jwt JWT_FILE) and to the consensus client. No other program needs it.

  • Keep the Engine API on the loopback address. This is the default (--authrpc-addr 127.0.0.1). If the consensus client is on a different machine, use a private network or a tunnel. Do not open the Engine API port in the firewall to the internet.

  • The token is valid for 60 seconds around its iat claim. Keep the clock of the machine correct with NTP.

The JSON-RPC API ​

The JSON-RPC API (--http, HTTP and WebSocket on one port) has no authentication. Each client can send transactions and start costly requests, for example traces and calls.

  • Keep it on the loopback address. This is the default (--http-addr 127.0.0.1).
  • Do not expose it to the internet directly. If remote clients need it, put a reverse proxy in front of it. The proxy must give TLS, authentication and rate limits. It must also limit the methods to the methods that the clients need.
  • Serve mode (cinder --serve) opens the database read-only. Use it to serve JSON-RPC clients from a separate process.
  • Serve only the namespaces that the clients need. The default is eth, net and web3, as in reth. debug and trace are expensive: add them with --http-api and --ws-api only when the clients need them.
  • Set a time limit for each request with --rpc-timeout D, so a slow request cannot hold a thread and a read transaction for a long time.
  • Each request takes a reader permit of the database, so JSON-RPC requests cannot take the reader slots that block import needs. At the default connection cap of 500, no request waits. With a cinder --serve process on the same database, keep the sum of the connection caps of the two processes below 3000. Read More JSON-RPC load.
  • One client can have at most 256 filters. Clients on the same host have no such limit, so a proxy on the same host removes it. Behind a proxy on another host, all clients share the address of the proxy: set --rpc-filters-per-client 0 and let the proxy limit each client. Read Filters.

Ports ​

PortDefaultWho connectsOpen to the internet
Engine API127.0.0.1, TCPthe consensus clientno
JSON-RPC, HTTP and WebSocket127.0.0.1, TCPyour applicationsno, only through a proxy
P2Pall addresses, TCP and UDPother Ethereum nodesyes, with --p2p

For the default port numbers, read Command line.

Files and permissions ​

  • Run Cinder as a dedicated user without root rights. The node needs no root rights. For a higher priority of the executing thread, give the binary only the CAP_SYS_NICE capability (read Tuning). Do not give it other capabilities.

  • Make that user the owner of DIR, and remove the access of other users:

    bash
    chmod 700 DIR
  • With --p2p, the node keeps its P2P private key in DIR/nodekey. The node makes this file with mode 600. The file DIR/p2p-nodes holds only public addresses of other nodes. The key sets the identity of the node on the network. Do not copy it to a different node.

  • Give JWT_FILE mode 600. Only the user of Cinder and the user of the consensus client must read it. If both users are different, use a shared group and mode 640.