CPP-Ethereum JSON-RPC miner_setEtherbase improper authorization Vulnerability
The miner_setEtherbase JSON-RPC method in cpp-ethereum lacked the administrator privilege check that its sibling method admin_eth_setMiningBenefactor enforced. An unauthenticated remote attacker could therefore change the mining beneficiary address, which is functionality reserved for administrators.
Originally disclosed on Cisco Talos
An exploitable improper authorization vulnerability exists in minersetEtherbase 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_setEtherbase handler omitted the RPC_ADMIN privilege check that the equivalent admin_eth_setMiningBenefactor handler performs before delegating to it.
Impact
An unauthenticated attacker could change the mining beneficiary address; the default binding to all interfaces and the unenforced JSON content type mean the call could also be triggered via CSRF or SSRF, though the admin interface is off by default.
What the attacker needed
Admin interface enabled via HTTP; network access to the RPC port; no credentials needed
The fix
The method should enforce the same administrator privilege check as admin_eth_setMiningBenefactor, and the interface should default to localhost with the JSON content type enforced.
How it was found
- Start the cpp-ethereum node with the admin interface exposed over HTTP.
- Send a JSON-RPC request to the miner_setEtherbase method with an address parameter.
- Observe that the request succeeds without any 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.
This Ethereum client runs a small web service (JSON-RPC) that lets programs control the node. Some commands are meant only for administrators, and the code is supposed to check who is calling before running them. One command that changes where mining rewards are paid skipped that check, so anyone who could reach the service could run it.
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.