In governance.sol
contract system, identical proposal operations can be executed multiple times by creating different proposals with the same parameters. This is possible because the operation hash in TimelockController.sol
is derived from both operation parameters and a salt based on proposalId, allowing replay attacks through different proposalIds.
This stems from insufficient operation uniqueness validation - while the timelock prevents replaying the exact same operation hash, it fails to detect when the same underlying operation is executed with a different salt. This could allow malicious actors to drain protocol funds or execute critical operations multiple times.
In Governance.sol:
The vulnerability arises because:
Operation uniqueness relies solely on operation hash
Hash includes proposalId-based salt
Same operation parameters with different proposalIds create different hashes
No validation of duplicate operation parameters
Timelockcontroller.sol
treats each hash as unique operation
Proof of Code:
Attacker creates first proposal:
Creates second identical proposal:
Different hashes generated:
Both proposals can be executed:
Protocol funds can be drained through repeated transfers
Critical operations can be executed multiple times
Governance decisions can be replayed
No limit on number of replays possible
Breaks timelock security assumptions
Treasury Drain
Attacker creates multiple proposals to transfer funds
Each proposal uses same parameters but different ID
Successfully drains treasury through repeated transfers
Parameter Changes
Critical protocol parameters can be changed multiple times
Each change appears as unique operation to timelock
Could destabilize protocol through repeated modifications
Use Nonce-Based Salt:
Add Parameter Validation:
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.