nonReentrant modifier in the analyzed smart contract is incorrectly implemented, allowing for a potential reentrancy attack. This vulnerability arises because the locked flag is reset (locked = false) after the main function logic has been executed. As a result, the protection mechanism fails, leaving the contract susceptible to recursive callsThe flawed implementation of the nonReentrant modifier is as follows:
The vulnerability could allow an attacker to call the same function multiple times within a single transaction, bypassing logic and potentially draining funds.
To fix the vulnerability, update the nonReentrant modifier to ensure the locked flag is set before executing the function logic and reset after execution is complete.
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.