Submitted by immeas, also found by markus_ether, 0xkazim, kutugu, T1MOH, bin2chen, berlin-101 (1, 2), and ABAIKUNANBAEV
https://github.com/code-423n4/2023-07-moonwell/blob/main/src/core/Governance/TemporalGovernor.sol#L27 
https://github.com/code-423n4/2023-07-moonwell/blob/main/src/core/Governance/TemporalGovernor.sol#L188-L198 
https://github.com/code-423n4/2023-07-moonwell/blob/main/src/core/Governance/TemporalGovernor.sol#L256
When a guardian pauses TemporalGovernor they lose the ability to pause again. This can then be reinstated by governance using grantGuardiansPause.
However grantGuardiansPause can be called when the contract is still paused. This would break the assertions in permissionlessUnpause and togglePause: assert(!guardianPauseAllowed).
Also, TemporalGovernor inherits from OpenZeppelin Ownable. There the owner has the ability to renounceOwnership.
This could cause TemporalGovernor to end up in a bad state, since revokeGuardian call that has special logic for revoking the guardian.
There is the ability to combine these two issues to brick the contract:
The contract is bricked. Since permissionlessUnpause cant be called due to the assert(!guardianPauseAllowed). No cross chain calls an be processed because executeProposal is whenNotPaused and there is no guardian to execute fastTrackProposalExecution. Thus the TemporalGovernor will be stuck in paused state.
It is also possible for the guardian to hold the contract hostage before step 3 (renounceOwnership) as they are the only ones who can execute calls on it (through fastTrackProposalExecution).
This is scenario relies on governance sending a cross chain grantGuardiansPause while the contract is still paused and a malicious guardian which together are unlikely. Though the docs mention this as a concern:
Test in TemporalGovernorExec.t.sol:
However unlikely this is to happen, there are some simple steps that can be taken to prevent if from being possible:
Consider adding whenNotPaused to grantGuardiansPause to prevent mistakes (or possible abuse). And also overriding the calls renounceOwnership and transferOwnership. transferOwnership should be a governance call (msg.sender == address(this)) to move the guardian to a new trusted account.
Perhaps also consider if the assert(!guardianPauseAllowed) is worth just for pleasing the SMT solver.
ElliotFriedman (Moonwell) confirmed
