Open c4-bot-7 opened 8 months ago
H-03: An attacker can hijack any ERC1155 token he rents due to a design issue in reNFT via reentrancy exploitation
Rental NFTs were transferred to the rental wallet before the zone validateOrder() was executed. That allowed a malicious user to bypass the Guard protection via an NFT callback + fallback handler, or via a malicious zone vall.
validateOrder()
PR-14: Create intermediary transfers on rent
By transferring the tokens to the Create policy first, no malicious actions like an approval can be made on the rental wallet before the NFTs are registered (as the tokens are still in the Create policy during validateOrder() execution).
Successful Mitigation
gzeon-c4 marked the issue as satisfactory
Lines of code
Vulnerability details
C4 Issue
H-03: An attacker can hijack any ERC1155 token he rents due to a design issue in reNFT via reentrancy exploitation
Comments
Rental NFTs were transferred to the rental wallet before the zone
validateOrder()
was executed. That allowed a malicious user to bypass the Guard protection via an NFT callback + fallback handler, or via a malicious zone vall.Mitigation
PR-14: Create intermediary transfers on rent
By transferring the tokens to the Create policy first, no malicious actions like an approval can be made on the rental wallet before the NFTs are registered (as the tokens are still in the Create policy during
validateOrder()
execution).Conclusions
Successful Mitigation