# #41368 \[BC-High] RPC server takedown

**Submitted on Mar 14th 2025 at 12:30:50 UTC by @keizo for** [**Attackathon | Movement Labs**](https://immunefi.com/audit-competition/movement-labs-attackathon)

* **Report ID:** #41368
* **Report Type:** Blockchain/DLT
* **Report severity:** High
* **Target:** https://github.com/immunefi-team/attackathon-movement/tree/main/docker/compose/movement-full-node/docker-compose.celestia-mainnet.yml
* **Impacts:**
  * RPC API crash affecting programs with greater than or equal to 25% of the market capitalization on top of the respective layer

## 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"}]
```

2. See that you get normal response with \~50,000 bytes long response
3. 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.
4. Add your RPC ip to line 152 `<YOUR_RPC_IP_HERE>` and run the code with command `python tester.py -v`
5. Observe 255 MB response and longer delay
6. From the line 162 (`threads = 1`) edit the amount of requests sent in parallel to 3
7. Run the code and observe large load caused to the RPC server
8. Continue increasing the amount of queries in a batch and the amount of parallel requests until impact is achieved.
