In FeeCollector.sol contract's treasury update mechanism has a flaw where any one can execute a pending treasury update after the timelock period, bypassing the intended admin control over the update timing. While the initiation of treasury changes is restricted to admin, the actual execution lacks access control, allowing attackers to control the timing of sensitive treasury updates.
The vulnerability exists in the treasury update process:
Treasury Update Initiation: https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/collectors/FeeCollector.sol#L237
Treasury Update Execution: https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/collectors/FeeCollector.sol#L306
Create a test file and add this poc:
Attack Path:
Admin initiates treasury update with timelock:
Timelock period passes:
Attacker can execute update before admin:
Admin loses control over update timing:
Security Risks:
Attackers can control timing of treasury updates
Potential for malicious timing coordination with other attacks
Admin loses control over critical protocol parameter changes
Add an access control to the function.
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.