Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: medium
Valid

Dual Execution via ID Collision

Summary

Both regular and emergency operations use the same ID generation logic but are stored in separate mappings (_operations and _emergencyActions). This allows An operation to exist simultaneously in both mappings.

  1. The same transaction batch to be executed twice:

    • Once via executeEmergencyAction (immediately, bypassing timelock)

    • Again via executeBatch (after timelock delay)

Vulnerability Details

Step-by-Step Exploit

  1. Create Colliding ID:
    Proposer creates a regular operation with parameters (targets, values, calldatas, salt), generating ID X.

  2. Schedule Emergency Action:
    Emergency role schedules an emergency action with the same parameters, reusing ID X.

  3. Execute via Emergency:

executeEmergencyAction(X) // Bypasses timelock delay

Execute via Regular:
After timelock delay:

executeBatch(X) // Executes same logic again

executeEmergencyAction doesn't check regular operations and executeBatch doesn't check emergency actions

Impact

If the operation sends 100 ETH to an address:

targets = [0xWallet], values = [100 ETH], calldatas = [transfer()]

Attacker executes it twice, draining 200 ETH instead of 100 ETH.

Tools Used

Foundry

Recommendations

Add a type discriminator to the ID hashing to prevent collisions

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

TimelockController.executeEmergencyAction doesn't mark operations as executed, allowing the same operation to be executed again through the regular path

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

TimelockController.executeEmergencyAction doesn't mark operations as executed, allowing the same operation to be executed again through the regular path

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.