Submitted by PENGUN, also found by dutra, vnavascues, falconhoof, grearlake, ReadyPlayer2, Draiakoo, peanuts, zhaojie, Matue, cu5t0mpeo, piyushshukla, 0xanmol, zhanmingjing, and J4X
https://github.com/code-423n4/2024-01-salty/blob/main/src/dao/Proposals.sol#L259-L293 
https://github.com/code-423n4/2024-01-salty/blob/main/src/dao/Proposals.sol#L385-L400
Reuse of SALT that has already been used for voting could allow a malicious proposal to pass and compromise the protocol.
castVote is a function that votes as much SALT as is being staked on the proposal.
Calling it again on a proposal that has already been voted on will revert the existing vote.
Therefore, the same account cannot vote multiple times on the same proposal. However, it is possible to re-vote by unstaking SALT and transferring it to another account.
The reason this is a viable attack is because the conditions under which a proposal can be finalized are unusual.
In a typical voting system, there is a period of time during which a proposal can be voted on, and if it does not meet the quorum, it is dropped, and if it does, the ratio of upvotes to downvotes determines whether it should be executed.
However, Saltys voting system allows the voting period to be infinitely long if the quorum is not met. In other words, if the voting lasts longer than the period required to unstake SALT, it can be unstaked and transferred to another account to vote again.
The scenario for the attack is as follows
A short-term solution is to use ballotMaximumEndTime to prevent votes from lasting too long.
A more fundamental solution would be to take a snapshot of the staked SALT and make it available for voting, like ERC20Votes, to prevent re-voting after a transfer.
othernet-global (Salty.IO) confirmed and commented:
Status: Mitigation confirmed. Full details in report from zzebra83.
