#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:

  1. Replay attack (nonce is not checked)

  2. Unplanned transfers (nextTransferTime and nextTransferAmount are 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

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

  1. Add these multisig addresses:

  1. Run a network with 10 nodes

  2. Run the following code once the network is ready

  1. 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?