The TimelockController allows privileged roles (EMERGENCY_ROLE) to bypass the timelock delay and execute arbitrary actions immediately. This violates the core purpose of a timelock—to provide users with a grace period to audit or react to sensitive changes. Attackers can exploit this to drain funds, alter governance, or disable critical protocol functions without warning.
https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/governance/proposals/TimelockController.sol#L223
https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/governance/proposals/TimelockController.sol#L237
Example Scenario :
An malicious actor gains EMERGENCY_ROLE as an EMERGENCY_ROLE holder
Schedule Malicious Action: Call scheduleEmergencyAction to queue a payload (e.g., transfer all funds to attacker’s address).
Execute Immediately: Call executeEmergencyAction in the same transaction, bypassing any timelock delay.
Code Proof:
In TimelockController.sol, emergency actions skip the timelock:
Attack Simulation:
Normal Timelock: A proposal to drain funds requires a 7-day delay.
Emergency Bypass:
Actor schedules and executes transferFunds(to=attacker) in one transaction.
Funds are stolen instantly.
The malicious Actor can drain all protocol assets.
Governance Takeover: Emergency roles can replace governance contracts or parameters.
Loss of Trust: Users lose confidence in the protocol’s safety mechanisms.
Manual review
Enforce a minimum emergency delay and restrict EMERGENCY_ROLE to multi-sig/DAO.
Step 1: Add Emergency Delay
Step 2: Restrict EMERGENCY_ROLE to Multi-Sig
Step 3: Add Transparency Events
Why this fix works :
Mandatory Delay: Even emergency actions require a 24-hour delay, allowing users to react.
Multi-Sig Control: Reduces single-point-of-failure risk.
Transparency: Events track emergency actions for public auditing.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.