code-423n4 / 2024-02-renft-mitigation-findings

0 stars 0 forks source link

H-03 MitigationConfirmed #4

Open c4-bot-7 opened 8 months ago

c4-bot-7 commented 8 months ago

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

c4-judge commented 8 months ago

gzeon-c4 marked the issue as satisfactory