There is a reentrancy vulnerability in refund() function, it uses the nonReentrant modifier but it has an issue. This leaves an open door to all the functions that use the modifier.
Malicious user can drain the ETH from contract by calling refund and reentering it. The nonReentrantdoes not set the lockedvariable to true and it stays false all the time which leads to pass the require statement.
Function first sends the value to the msg.sender if the receiver is smart contract it can easily reentrant the same function and receive the same amount again and again untril the balance is 0.
Draining all the ETH amount of contract.
Manual
Even if the there is a nonReentrant mutex lock, always follow CEI standard, Check, Effect, Interact:
Also fix the modifier:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.