Not verifying the signatures upon execution leads to direct loss of funds
The Movement full node does not verify transaction signatures when executing a block, so any transaction sent directly to the DA light node is treated as valid. An attacker could submit a transaction with an invalid signature and have it executed, leading to direct loss of funds.
Originally disclosed on Immunefi
- Disclosed after under an hour
#43307 [BC-High] Not verifying the signatures upon execution leads to direct loss of funds
Submitted on Apr 4th 2025 at 13:05:49 UTC by @HollaDieWaldfee for Attackathon | Movement Labs
- Report ID: #43307
- Report Type: Blockchain/DLT
- Report severity: High
- Target: https://github.com/immunefi-team/attackathon-movement/tree/main/networks/movement/movement-full-node
- Impacts:
- Direct loss of funds
Description
Brief/Intro
Upon execution of a block, every transaction is treated as valid since there is no verification that the signature is valid. Hence, an attacker could send any transaction directly to the DA light node with an invalid signature.
Vulnerability Details
When submitting a transaction, it is verified that the signature is valid. Therefore, every transaction is treated as a valid transaction with a verified signature after it is submitted. However, an attacker could send transactions directly to the DA light node with an invalid signature. This transaction will then be treated like a valid transaction with a verified signature as can be seen in the code snippet below.
async fn execute_block(
&mut self,
block: Block,
block_timestamp: u64,
) -> anyhow::Result<BlockCommitment> {
let block_id = block.id();
let block_hash = HashValue::from_slice(block.id())?;
// get the transactions
let mut block_transactions = Vec::new();
let block_metadata = self.executor.build_block_metadata(
HashValue::sha3_256_of(block_id.as_bytes().as_slice()),
block_timestamp,
)?;
let block_metadata_transaction =
SignatureVerifiedTransaction::Valid(Transaction::BlockMetadata(block_metadata));
block_transactions.push(block_metadata_transaction);
for transaction in block.transactions() {
let signed_transaction: SignedTransaction = bcs::from_bytes(transaction.data())?;
// check if the transaction has already been executed to prevent replays
if self
.executor
.has_executed_transaction_opt(signed_transaction.committed_hash())?
{
continue;
}
@> let signature_verified_transaction = SignatureVerifiedTransaction::Valid(
Transaction::UserTransaction(signed_transaction),
);
block_transactions.push(signature_verified_transaction);
}
// ..
}
On the other hand, Aptos Core verifies the signatures upon execution (reference (3)):
async fn prepare_block(
execute_block_tx: mpsc::UnboundedSender<ExecuteBlockCommand>,
command: PrepareBlockCommand,
) {
// ..
let sig_verified_txns: Vec<SignatureVerifiedTransaction> =
SIG_VERIFY_POOL.install(|| {
let num_txns = txns_to_execute.len();
txns_to_execute
.into_par_iter()
.with_min_len(optimal_min_len(num_txns, 32))
.map(|t| t.into())
.collect::<Vec<_>>()
});
// ..
}
Furthermore, Aptos Core only executes valid transactions and discards invalid transactions (reference (4)):
pub fn execute_single_transaction(
&self,
txn: &SignatureVerifiedTransaction,
resolver: &impl AptosMoveResolver,
log_context: &AdapterLogSchema,
) -> Result<(VMStatus, VMOutput), VMStatus> {
assert!(!self.is_simulation, "VM has to be created for execution");
if let SignatureVerifiedTransaction::Invalid(_) = txn {
let vm_status = VMStatus::error(StatusCode::INVALID_SIGNATURE, None);
let discarded_output = discarded_output(vm_status.status_code());
return Ok((vm_status, discarded_output));
}
// ..
}
To fix this issue, there must be verification in execute_settle.rs#execute_block() that the signature is valid before executing a block. The verification could look like reference (3 & 4) that is made inside of Aptos Core. The way in which Movement integrates with the Aptos Core block execution is invalid since it lacks the crucial signature validation.
Impact Details
Since an attacker can send any transaction directly to the DA light node and that transaction is going to be treated like a valid transaction without signature validation, this causes a direct loss of funds.
References
Proof of Concept
Proof of Concept
- An attacker sends a transaction directly to the DA light node by calling
passthrough::batch_write()(reference (1)). - This transaction is going to be treated as valid since there is no verification for the signature upon execution (reference (2)). The transaction is treated as a
SignatureVerifiedTransaction::Validtype without actually verifying the signature.
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
The block execution code wraps every transaction as 'SignatureVerifiedTransaction::Valid' without actually verifying the signature, unlike Aptos Core which verifies and discards invalid signatures.
Impact
An attacker could send any transaction directly to the DA light node and have it treated as valid without signature validation, causing a direct loss of funds.
What the attacker needed
Ability to send transactions to the DA light node
The fix
The execute_block function should verify that each transaction's signature is valid before executing it, as Aptos Core does.
How it was found
- An attacker sends a transaction directly to the DA light node by calling passthrough::batch_write().
- The transaction is treated as valid because there is no signature verification upon execution.
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 transaction normally includes a digital signature that proves who sent it. This system skipped checking that signature when running the transaction, so anyone could pretend to be someone else and move funds.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.