Submitted by jasonxiale, also found by iglyx, 0xA5DF, said, shark, and 0xG0P1
Calling NounsDAOLogicV1Fork.quit by using dupliated ERC20 tokens, malicious user can gain more ERC20 tokens than he/she is supposed to, even drain all ERC20 tokens.
In function, NounsDAOLogicV1Fork.quit, erc20TokensToInclude is used to specified tokens a user wants to get, but since the function doesnt verify if erc20TokensToInclude contains dupliated tokens, its possible that a malicious user calls the function by specify the ERC20 more than once to get more share tokens.
Add the following code in test/foundry/governance/fork/NounsDAOLogicV1Fork.t.sol file NounsDAOLogicV1Fork_Quit_Test contract,
and run forge test --ffi --mt test_quit_allowsChoosingErc20TokensToIncludeTwice.
VS
By using function checkForDuplicates to prevent the issue
eladmallel (Nouns DAO) confirmed and commented:
gzeon (judge) increased severity to High
