location: /src/SablierFlow.sol
Description: The withdraw
function first decrements the user's balance and then makes an external call to transfer tokens. If the token contract is malicious and calls back into the withdraw
function before the state is updated, it could allow the attacker to withdraw more than their balance.
Real-World Consequences: This vulnerability could lead to significant financial losses for users and damage the reputation of the contract.
Checks-Effects-Interactions Pattern: Change the order of operations. Perform state updates (effects) before making external calls (interactions).
Reentrancy Guard: Implement a reentrancy guard using OpenZeppelin's ReentrancyGuard
to prevent multiple invocations of the function.
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.