Reentrancy for function call before state update #294
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate
This issue or pull request already exists
Lines of code
https://github.com/code-423n4/2022-07-ens/blob/main/contracts/wrapper/NameWrapper.sol#L819-L821
Vulnerability details
Impact
An external call "_transfer" is made before updating state data through "_setFuses" and "_setFuses" does not depend on any data from "_transfer".
https://github.com/code-423n4/2022-07-ens/blob/main/contracts/wrapper/NameWrapper.sol#L819-L821.
Proof of Concept
Reentrancy is not only an effect of Ether transfer but of any function call on another contract.
The contract should make use of the Checks-Effects-Interactions Pattern.
Recommended Mitigation Steps
Update the state before making the external call.
The text was updated successfully, but these errors were encountered: