Submitted by immeas, also found by 0xComfyCat, Vagner, markus_ether, kutugu, ast3ros, and volodya
Wormhole cross chain communication is multicasted to all their supported chains:
The TermporalGovernor contract handles this by checking queueProposal that the intendedRecipient is itself:
https://github.com/code-423n4/2023-07-moonwell/blob/main/src/core/Governance/TemporalGovernor.sol#L320-L322
There is also a fastTrackProposalExecution that the guardian can perform (owner is referred ot as guardian):
https://github.com/code-423n4/2023-07-moonwell/blob/main/src/core/Governance/TemporalGovernor.sol#L261-L268
This will bypass the queueProposal flow and execute commands immediately.
The issue here is that there is no check in _executeProposal that the intendedRecipient is this TemporalGovernor.
governor can execute any commands communicated across Wormhole as long as they are from a trusted source.
This requires that the targets line up between chains for a governor to abuse this. However only one target must line up as the .call made does not check for contract existence. Since unaligned addresses between chains will most likely not exist on other chains these calls will succeeed.
Test in TemporalGovernorExec.t.sol, all of the test is copied from testProposeFailsIncorrectDestination with just the change at the end where instead of calling queueProposal, fastTrackProposalExecution is called instead, which doesnt revert, thus highligting the issue.
Consider adding a check in _executeProposal for intendedRecipient same as is done in _queueProposal.
ElliotFriedman (Moonwell) confirmed and commented:
