Skip to content
Access control Audit finding Beginner

fastTrackProposalExecution should only be callable when TemporalGovernor is paused

The fastTrackProposalExecution function lacked the whenPaused modifier, so the TemporalGovernor owner could queue and execute any proposal at any time without delay or voting. This bypassed the intended emergency-only use and undermined the DAO's permissionless governance process.

Aymen0909 Follow with hals, sces60107 and 2 others

Originally disclosed on Code4rena

Submitted by Aymen0909, also found by hals, sces60107, Jigsaw, and ABAIKUNANBAEV

The function fastTrackProposalExecution is supposed to be used by the TemporalGovernor owner during periods of emergency, when the contract is paused to fast track a certain proposal (queue and execute a proposal directly without delay or voting), with gaol of ensuring the protocol safety.

But the function fastTrackProposalExecution is missing the whenPaused modifier which means it can be called at any time to fast track any proposal and not just when the TemporalGovernor is paused.

I submit this issue as only Medium risk because only the TemporalGovernor owner can call the fastTrackProposalExecution function (and i suppose that the owner is trusted and will not execute malicious actions), but this issue still goes against the intent of the governance process in which the members of the DAO are supposed to propose, vote and execute the proposals in a permissionless and decentralized manner and where the owner should not be able to execute actions on the protocol without the agreement of the members (except for those emergency situation of course).

Proof of Concept

The issue is present in the fastTrackProposalExecution function below :

/// @notice Allow the guardian to process a VAA when the
/// Temporal Governor is paused this is only for use during
/// periods of emergency when the governance on moonbeam is
/// compromised and we need to stop additional proposals from going through.
/// @param VAA The signed Verified Action Approval to process
function fastTrackProposalExecution(bytes memory VAA) external onlyOwner {
    // @audit can be called when contract is not paused
    _executeProposal(VAA, true); /// override timestamp checks and execute
}

As it can be seen the function does not contain the whenPaused modifier and thus it can be called at any moment by the owner to fast track a proposal.

We can also notice that the function comments do mention the fact that it should only be called when the Temporal Governor is paused.

Recommended Mitigation Steps

I recommend to add the whenPaused modifier to the fastTrackProposalExecution function, in order to ensure that the governance process will always work as a real DAO and the owner only intervene in the emergency cases.

ElliotFriedman (Moonwell) confirmed in a duplicate issue (245)


The original report as published on Code4rena, by Aymen0909. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The fastTrackProposalExecution function was declared with only the onlyOwner modifier and omitted the whenPaused modifier that its documented purpose requires.

Impact

The owner could fast-track and execute proposals outside emergencies, bypassing the DAO's voting process; the report rates this Medium because the owner is assumed trusted.

What the attacker needed

Caller is the TemporalGovernor owner

The fix

The whenPaused modifier should be added to fastTrackProposalExecution so it can only run while the contract is paused.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A governor contract lets a community vote on changes. An emergency shortcut was meant to work only while the contract was paused, but the check for that was missing. The owner could therefore use the shortcut whenever they liked, skipping the vote.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Aymen0909

View all

22 more disclosed reports, best first.

More from Moonwell

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.