Submitted by pfapostol, also found by MrPotatoMagic
https://github.com/code-423n4/2024-12-bakerfi/blob/0daf8a0547b6245faed5b6cd3f5daf44d2ea7c9a/contracts/core/VaultRouter.sol#L99
The dispatch function of the VaultRouter contract handles the execution of actions from the MultiCommand.execute call.
Actions are encoded as follows (Right-to-Left):  
While most commands are handled using the corresponding action stored in the actionToExecute variable:
There is one exception. Likely due to a typo, the action tuple is used instead of actionToExecute:
If an inputMapping is supplied with actionToExecute equal PULL_TOKEN, the execution will revert with InvalidCommand(uint256 action).
This PoC follows these steps:
Use correct variable:
chefkenji (BakerFi) confirmed
BakerFi mitigated:
Status: Mitigation confirmed. Full details in reports from 0xlemon and shaflow2.
