Submitted by kirk-baird
Users who have not called withdrawGovernanceAsset()  after  they have locked their tokens from a previous proposal (i.e. assertGovernanceApproved), will lose their tokens if assertGovernanceApproved() is called again with the same target and sender.
The sender will lose pendingFlashDecision[target][sender].amount tokens and the tokens will become unaccounted for and locked in the contract. Since the new amount is not added to the previous amount, instead the previous amount is overwritten with the new amount.
The impact of this is worsened by another vulnerability, that is assertGovernanceApproved() is a public function and may be called by any arbitrary user so long as the sender field has called approve() for FlashGovernanceArbiter on the ERC20 token. This would allow an attacker to make these tokens inaccessible for any arbitrary sender.
In assertGovernanceApproved() as seen below, the linependingFlashDecision[target][sender] = flashGovernanceConfig will overwrite the previous contents. Thereby, making any previous rewards unaccounted for and inaccessible to anyone.
Note that we must wait pendingFlashDecision[target][sender].unlockTime between calls.
Consider updating the initial if statement to ensure the pendingFlashDecision for that target and sender is empty, that is:
Note we cannot simply add the new amount to the previous amount incase the underlying asset has been changed.
gititGoro (Behodler) confirmed and commented:
