CPP-Ethereum JSON-RPC miner_start improper authorization Vulnerability
The miner_start JSON-RPC method in cpp-ethereum lacked the administrator privilege check that similar methods enforced, so an unauthenticated remote attacker could start mining. The text also notes the interface binds to all interfaces by default and does not enforce the JSON content type, making it reachable via CSRF or SSRF.
Originally disclosed on Cisco Talos
An exploitable improper authorization vulnerability exists in minerstart API of cpp-ethereum’s JSON-RPC (commit 4e1015743b95821849d001618a7ce82c7c073768). A JSON request can cause an access to the restricted functionality resulting in authorization bypass.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The miner_start handler omitted the RPC_ADMIN privilege check that the equivalent admin_eth_setMining handler performs.
Impact
An unauthenticated remote attacker could start mining on the node; the text notes the admin interface is off by default, but when enabled it binds to all interfaces and does not enforce the JSON content type, so requests could also be triggered via CSRF or SSRF.
What the attacker needed
Admin interface enabled over HTTP; network access to the JSON-RPC port
The fix
The miner_start handler should perform the same administrator privilege check as the other admin methods.
How it was found
- Start the client with the admin interface exposed over HTTP.
- Send a JSON-RPC request to set the etherbase.
- Send a JSON-RPC request calling miner_start and observe it succeeds without credentials.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A JSON-RPC server lets programs send commands to the Ethereum client over the network. Some commands, like starting the miner, are meant only for administrators, but this one forgot to check who was calling. Anyone who could reach the port could therefore start mining without logging in.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.