Skip to content
Business logic Audit finding Intermediate

Transactions directly sent to the passthrough will cause the mempool to accept more transactions than the inflight_limit

The mempool's inflight transaction counter is decremented when blocks are executed, but transactions sent directly to the passthrough DA light node bypass the increment step. An attacker could send transactions directly to the DA light node, causing the counter to drop below zero and allowing the mempool to accept more transactions than the configured inflight_limit.

KlosMitSoss Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

#41678 [BC-Medium] Transactions directly sent to the passthrough will cause the mempool to accept more transactions than the `inflight_limit`

Submitted on Mar 17th 2025 at 14:22:44 UTC by @KlosMitSoss for Attackathon | Movement Labs

Description

Brief/Intro

Whenever a block is executed, the number of transactions in flight is decremented by the number of transactions in the block. This way, it is ensured that there are not more than the maximum number of transactions allowed (inflight_limit) in the mempool. However, this number can be less than it should be when transactions are directly sent to the passthrough DA light node.

Vulnerability Details

The number of transactions in flight is incremented every time a new transaction is submitted by calling transaction_pipe::submit_transaction().

Rust
	async fn submit_transaction(
		&mut self,
		transaction: SignedTransaction,
	) -> Result<SubmissionStatus, Error> {
		// Check whether the account is whitelisted
		if !self.is_whitelisted(&transaction.sender())? {
			return Ok((MempoolStatus::new(MempoolStatusCode::TooManyTransactions), None));
		}
                ... ..
				// increment transactions in flight
				{
					let mut transactions_in_flight = self.transactions_in_flight.write().unwrap();
>>					transactions_in_flight.increment(now, 1);
				}
                ... ...
	}

https://github.com/movementlabsxyz/movement/blob/ec71271bbd022e89a1e3e917629b83442ac2e9d4/protocol-units/execution/maptos/opt-executor/src/background/transaction\\_pipe.rs#L339-L342

It is ensured that there can never be more than inflight_limit transactions in the mempool. Otherwise, the mempool status returns MempoolIsFull and new transactions cannot be submitted.

The number of transactions in flight is then decremented when a block is executed.

Rust
	async fn process_block_from_da(
		&mut self,
		response: StreamReadFromHeightResponse,
	) -> anyhow::Result<()> {
        ... ...
		let block: Block = bcs::from_bytes(&block_bytes[..])?;

		// get the transactions
		let transactions_count = block.transactions().len();
		let span = info_span!(target: "movement_timing", "execute_block", block_id = %block.id());
		let commitment =
			self.execute_block_with_retries(block, block_timestamp).instrument(span).await?;

		// decrement the number of transactions in flight on the executor
>>		self.executor.decrement_transactions_in_flight(transactions_count as u64);
        ... ...
	}

https://github.com/movementlabsxyz/movement/blob/ec71271bbd022e89a1e3e917629b83442ac2e9d4/networks/movement/movement-full-node/src/node/tasks/execute\\_settle.rs#L100-L187

However, if transactions are sent directly to the passthrough DA light node API by calling batch_write, the number of transactions in flight will only decrement.

The attack is possible because the full node believes that every transaction has been sent through the full node itself which is not true because the DA light node exposes a public API.

Impact Details

The number of transactions in flight will be lower than it should be and transaction_pipe::submit_transaction allows to submit more transactions than it should. In fact, the number of transactions in flight can always be set to zero such that the mempool accepts an arbitrary number of transactions.

Hence, transactions can be submitted to the mempool beyond set parameters.

References

The relevant links are provided throughout the report.

Proof of Concept

Proof of Concept

  1. The attacker calls passthrough::batch_write (https://github.com/movementlabsxyz/movement/blob/ec71271bbd022e89a1e3e917629b83442ac2e9d4/protocol-units/da/movement/protocol/light-node/src/passthrough.rs#L230-L248) to send transactions directly to the DA light node.
  2. execute_settle::run() (https://github.com/movementlabsxyz/movement/blob/ec71271bbd022e89a1e3e917629b83442ac2e9d4/networks/movement/movement-full-node/src/node/tasks/execute\\_settle.rs#L70-L98) is called which executes the blob.
  3. Inside of this function, process_block_from_da() is called which decrements the number of transactions in flight (https://github.com/movementlabsxyz/movement/blob/ec71271bbd022e89a1e3e917629b83442ac2e9d4/networks/movement/movement-full-node/src/node/tasks/execute\\_settle.rs#L154).
  4. However, the number of transactions in flight has never been incremented by that amount. Therefore, the transactions in flight is lower than it should be which makes it possible to submit more transactions than should be allowed.

The original report as published on Immunefi, by KlosMitSoss. 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 inflight transaction counter is only incremented when transactions are submitted via the normal transaction pipe, but decremented for all transactions in executed blocks, including those sent directly to the passthrough DA light node.

Impact

The mempool could accept an arbitrary number of transactions beyond the configured inflight_limit, potentially causing network processing nodes to process transactions beyond set parameters.

What the attacker needed

Access to the passthrough DA light node API

How it was found

  1. The attacker calls `passthrough::batch_write` to send transactions directly to the DA light node.
  2. `execute_settle::run()` is called which executes the blob.
  3. Inside of this function, `process_block_from_da()` is called which decrements the number of transactions in flight.
  4. The number of transactions in flight is lower than it should be, allowing more transactions to be submitted than should be allowed.

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 mempool is a waiting area for transactions before they are added to the blockchain. The system tries to limit how many transactions can be waiting at once by keeping a counter that goes up when a transaction arrives and down when a block is processed. The bug is that transactions can be sent through a different path that only makes the counter go down, so the limit can be bypassed and too many transactions can pile up.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by KlosMitSoss

View all

25 more disclosed reports, best first.

More from Movement Labs

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.