Submitted by Trust, also found by IllIllI and Lambda
purchase() in GroupBuy.sol executes the purchase call for the group. After safety checks, the NFT is bought with \_markets execute() function. Supposedly it deploys a vault which owns the NFT. The code makes sure the vault is the new owner of the NFT and exits.
The issue is that \_market user-supplied variable is not validated at all. Attacker can pass their malicious contract, which uses the passed funds to buy the NFT and store it in attackers wallet. It will return the NFT-holding wallet so the checks will pass. As a result, attacker has the NFT while they could have contributed nothing to the GroupBuy. Attacker can also just steal the supplied ETH and return the current address which holds the NFT.
Attacker can steal the amount collected so far in the GroupBuy for NFT purchase.
\_market should be whitelisted, or supplied in createPool stage and able to be scrutinized.
mehtaculous (Tessera) confirmed and commented:
stevennevins (Tessera) mitigated:
Status: Mitigation not confirmed.  Full details in report from gzeon, and also included in the Mitigation Review section below.
