Emergency actions in the TimelockController contract can be executed immediately after being scheduled due to lack of validation for the 1-day delay. While both the documentation and code state the existence of a 1-day delay for emergency actions, this is delay is never enforced.
Medium. The lack of delay enforcement in emergency actions breaks a core invariant advertised to users, though damage is limited to the action being executed.
Medium. The issue can occur every time an emergency action is executed, breaking trust assumptions advertised to users.
The following proof of concept demonstrates that the emergency action delay, of 1 day, is not being enforced. To execute this proof of concept integrate foundry by running the following commands in your terminal, in the project's root directory:
Next, configure foundry by adding the following settings to foundry.toml:
After that, create a foundry/ directory inside the test/ directory. Inside foundry/, create the following file:
ProposalsModule.t.sol
And then paste the following code to ProposalsModule.t.sol:
Create a mapping in TimelockController that tracks the timestamp in which each emergency action will be ready for execution.
Store the timestamp in which the emergency action will be ready for execution in the TimelockController::scheduleEmergencyAction().
Validate that emergency action is ready for execution in the TimelockController::executeEmergencyAction().
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.