Unchecked transaction size allows malicious users to DOS honest users transactions
The transaction submission path does not check the size of a transaction before batching it with others and sending the batch to Celestia, which enforces a strict blob size limit. A malicious user can submit an oversized transaction that causes the entire batch to fail, denying service to honest users whose transactions are bundled with it.
- Disclosed after under an hour
#43214 [BC-Critical] Unchecked transaction size allows malicious users to DOS honest users transactions
Submitted on Apr 3rd 2025 at 18:46:51 UTC by @okmxuse for Attackathon | Movement Labs
- Report ID: #43214
- Report Type: Blockchain/DLT
- Report severity: Critical
- Target: https://github.com/immunefi-team/attackathon-movement/tree/main/protocol-units/execution/maptos/opt-executor
- Impacts:
- Network not being able to confirm new transactions (total network shutdown)
- A bug in the respective layer 0/1/2 network code that results in unintended smart contract behavior with no concrete funds at direct risk
Description
Description
Inside submit_transaction, the transaction is validated in the following manner:
let tx_result = vm_validator.validate_transaction(transaction.clone())?;
Note that up until now, no size check has been performed for the transaction data. This refers only to the size of the data, not its contents.
The transaction is then sent in the following manner:
//..code
self.transaction_sender.send((application_priority, transaction)).await
.map_err(|e| anyhow::anyhow!("Error sending transaction: {:?}", e))?;
//..code
After this, it is further handled inside spawn_write_next_transaction_batch:
Some((application_priority, transaction)) => {
info!(
//..code
Here, the transaction is received, serialized, and pushed into transactions:
transactions.push(BlobWrite { data: serialized_transaction });
Again, no data size check has been performed up to this point.
After serialization, the transactions are bundled into blobs and passed into batch_write:
let batch_write = BatchWriteRequest { blobs: transactions };
//..code
match da_light_node_client.batch_write(batch_write.clone()).await {
This is where the system makes contact with the Celestia node, which enforces a strict data size limit:
The maximum total blob size in a transaction is just under 2 MiB (1,973,786 bytes), based on a 64x64 share grid (4096 shares). With one share for the PFB transaction, 4095 shares remain: 1 at 478 bytes and 4094 at 482 bytes each.
If batch_write fails, the entire batch—including all bundled transactions—fails:
match da_light_node_client.batch_write(batch_write.clone()).await {
Ok(_) => {
info!(
target: "movement_timing",
batch_id = %batch_id,
"batch_write_success"
);
return;
}
Err(e) => {
warn!("failed to write batch to DA: {:?} {:?}", e, batch_id);
}
}
A malicious user can intentionally submit a transaction that exceeds Celestia's limits, causing the entire batch to fail. This happens because transaction size is not checked until all transactions are batched together and sent to Celestia.
Impact
This will trigger Err, resulting in all other transactions in the batch failing, regardless of their validity.
Recommendation
Do not allow users to single-handedly cause honest users' transactions to fail. Implement a transaction size check before batching.
Proof of Concept
POC:
A user submits a transaction with a higher data size than accepted by Celestia, it is first recognized inside receive_transaction_tick:
MempoolClientRequest::SubmitTransaction(transaction, callback) => {
It is then used inside submit_transaction:
let status = self.submit_transaction(transaction).instrument(span).await?;
Inside submit_transaction the transaction goes through the following process:
- Checked for whitelist
if !self.is_whitelisted(&transaction.sender())? {
return Ok((MempoolStatus::new(MempoolStatusCode::TooManyTransactions), None));
}
- Checked for validation
let tx_result = vm_validator.validate_transaction(transaction.clone())?;
Inside validate_transaction there are multiple checks, but no check for the data size.
It is further checked inside add_txn's flow, once again no data size check.
let status = self.core_mempool.add_txn(
Now finally, if the status is accepted, the transaction is sent:
self.transaction_sender.send((application_priority, transaction))
Now the next time this transaction is received is inside spawn_write_next_transaction_batch:
Some((application_priority, transaction)) => {
It is then finally batched with other honest valid transactions and then failed since Celestia will not accept data blobs that are higher than the limit, which is not checked up until they are batched and tried to process.
The malicious user now successfully DOS'ed multiple transactions with very little effort.
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 transaction submission and mempool code never enforces a maximum transaction size before transactions are serialised and bundled into a batch for Celestia.
Impact
A single malicious transaction can cause all other transactions in the same batch to fail, potentially shutting down the network's ability to confirm new transactions.
What the attacker needed
Ability to submit a transaction to the network
The fix
A transaction size check should be implemented before batching, so oversized transactions are rejected early.
How it was found
- Submit a transaction whose data size exceeds Celestia's blob limit.
- The transaction passes whitelist and validation checks because neither checks data size.
- The transaction is accepted into the mempool and sent to the batching component.
- The transaction is serialised and bundled with honest transactions into a batch.
- The batch is sent to Celestia, which rejects it because the total size is too large.
- The entire batch fails, including all honest transactions in it.
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 blockchain node groups many user transactions into a single batch and sends that batch to a storage service called Celestia. Celestia refuses batches that are too large, and if one batch fails, every transaction inside it fails too. The bug is that the node never checks a single transaction's size before adding it to the batch, so one user can make the whole batch too big and block everyone else's transactions.
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.