Skip to content
DoS Audit finding Beginner

JSON-RPC no batch query limitation allows really large responses | RPC server takedown

The Celestia node RPC server lacks a limit on the number of queries allowed in a single JSON-RPC batch request. An attacker can send a small number of requests containing tens of thousands of batched queries, causing the server to return very large responses and eventually crash the RPC service.

Keizo Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

#41368 [BC-High] RPC server takedown

Submitted on Mar 14th 2025 at 12:30:50 UTC by @keizo for Attackathon | Movement Labs

Description

Brief/Intro

There is no batch query limitation on the Celestia node RPC which allows to send hundreds of large RPC queries in a single request. This leads to excessive use of resources and takedown of the RPC service.

Vulnerability Details

Ín the local testing environment the RPC method "blockchain" returns ~25,000 bytes of data. This is not a lot, but when this is combined with the fact that there is no batch query limitation in place, will it lead to serious consequences. For example if user enters 100 times this same query as a batch query inside a single request, leads it to response size of 2.5 MB. Normal response delay is under 10 ms since it is local environment so keep this in mind.

Always when the server has to return lot of data and the delay starts to grow, causes it unnecessarily large load to the server.

During the testing the amount of batch queries were increased:

  • 1000x batch queries resulted in 25.5 MB response with a response delay of 1 sec. Request size 109,000 bytes
  • 10,000x batch queries resulted in 255 MB response with a response delay of 11.5 sec. Request size 1 MB
  • 50,000x batch queries resulted in i/o timeout error from the rpc server after a delay of 56 sec. Request size 5 MB. This also caused normal queries to have longer delays as normally (2ms --> 5 sec).

When this was taken little bit further by just sending the request with 50,000x batch queries 3x requests in parallel, caused this so large load to the server that it crashed and did not boot itself back online.

Impact Details

This could be utilized to cause major availability issues to the RPC and the node. Since it requires only very limited amount of requests to be sent by the attacker to cause the impact described, makes it really hard to be detected.

Link to Proof of Concept

https://gist.github.com/patuuh/4035799a8bb8eddb140fb199dab26bba

Proof of Concept

Proof of Concept

  1. Send request (add rpc ip to host header):
POST / HTTP/1.1
Host: <YOUR-RPC-IP-HERE>
Content-Type: application/json
Content-Length: 197

[{"jsonrpc":"2.0","method":"blockchain","params":{"minHeight":"0","maxHeight":"999999"},"id":"12"},{"jsonrpc":"2.0","method":"blockchain","params":{"minHeight":"0","maxHeight":"999999"},"id":"12"}]
  1. See that you get normal response with ~50,000 bytes long response
  2. Use the python script from the gist (https://gist.github.com/patuuh/4035799a8bb8eddb140fb199dab26bba) to generate and send single request with 10,000 RPC queries in a batch.
  3. Add your RPC ip to line 152 <YOUR_RPC_IP_HERE> and run the code with command python tester.py -v
  4. Observe 255 MB response and longer delay
  5. From the line 162 (threads = 1) edit the amount of requests sent in parallel to 3
  6. Run the code and observe large load caused to the RPC server
  7. Continue increasing the amount of queries in a batch and the amount of parallel requests until impact is achieved.

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

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

Likely the RPC server processes every entry in a JSON-RPC batch without enforcing a maximum batch size or response size limit.

Impact

The RPC service and node could suffer major availability issues and crash, and because only a few requests are needed, the attack is hard to detect.

What the attacker needed

Network access to the RPC endpoint

How it was found

  1. Send a small JSON-RPC batch request containing two blockchain queries and observe a normal response of about 50,000 bytes.
  2. Use the provided Python script to generate and send a single request with 10,000 RPC queries in a batch.
  3. Set the RPC IP in the script and run it to observe a 255 MB response and a longer delay.
  4. Change the script to send 3 requests in parallel and run it to observe a large load on the RPC server.
  5. Keep increasing the batch size and parallel request count until the server crashes.

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 ask a node for information by sending requests. Normally each request asks one question, but the protocol also allows a batch: a list of many questions in one request. This server did not cap how many questions a batch could contain, so a single small request could force it to produce a huge answer and use up its resources until it stopped working.

What is DoS?

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

More from Movement 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.