Submitted by immeas
Wormhole governance can change signing guardian sets. If this happens between a proposal is queued and a proposal is executed. The second verification in _executeProposal will fail as the guardian set has changed between queuing and executing.
This would cause a proposal to fail to execute after the proposalDelay has passed. Causing a lengthy re-sending of the message from Timelock on source chain, then proposalDelay again.
To execute a proposal on TemporalGovernor it first needs to be queued. When queued it is checked that the message is valid against the Wormhole bridge contract:
https://github.com/code-423n4/2023-07-moonwell/blob/main/src/core/Governance/TemporalGovernor.sol#L295-L306
Were this to happen between queueProposal and executeProposal the proposal would fail to execute.
Consider only check the VAAs validity against Wormhole in _executeProposal when it is fasttracked (overrideDelay==true).
However then anyone can just just take the hash from the proposal VAA and submit whatever commands. One idea to prevent this is to instead of storing the VAA vm.hash, use the hash of the complete VAA as key in queuedTransactions. Thus, the content cannot be altered.
Or, the whole VAA can be stored alongside the timestamp and the executeProposal call can be made with just the hash.
ElliotFriedman (Moonwell) confirmed and commented:
