#39850 [BC-Medium] Bypass TransferFromSecureAccount transaction validations
Submitted on Feb 8th 2025 at 22:59:06 UTC by @Blockian for Audit Comp | Shardeum: Core III
Report ID: #39850
Report Type: Blockchain/DLT
Report severity: Medium
Target: https://github.com/shardeum/shardeum/tree/bugbounty
Impacts:
Causing network processing nodes to process transactions from the mempool beyond set parameters
Description
Impact
All validations in verify can be bypassed, leading to:
Replay attack (nonce is not checked)
Unplanned transfers (
nextTransferTimeandnextTransferAmountare not checked)
Root Cause
In the function apply the call to verifyTransferFromSecureAccount can be avoided if isInternalTx is true, because applyInternalTx would be called before.
Attack Flow
An outside attacker can :
Wait for one transaction to be called
replay it to drain the source address
Inside attackers can:
Call a transfer that is unplanned
Suggested Fix
Move the call to
verifyto insideapplyInternalTx
Severity
This allows to drain a source secure account entirely and defeats the entire purpose of secure accounts, and so it critical.
Proof of Concept
Proof of Concept
Add these multisig addresses:
Run a network with 10 nodes
Run the following code once the network is ready
Re run it again with the same nonce / transaction and notice how it still works even though the none is out of sync and no transfer is planned
Was this helpful?