Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: medium
Valid

Huff version does not require the correct implementation of onERC721received in the mint function

Summary

Huff version does not require the correct implementation of onERC721received in the mint function, allowing contracts to freely mint horses as well.

Vulnerability Details

Mint function works differently for contracts between the huff and solidity versions as onERC721received

Paste the below into Base_Test.t.sol

function testMintingPOC() public {
uint256 horseId = horseStore.totalSupply();
vm.warp(10);
vm.roll(10);
vm.prank(user);
horseStore.mintHorse();
horseStore.mintHorse();
}

Impact

Not much as anyone can freely mint more horses anyway.

Tools Used

Foundry

Recommendations

Implement the onERC721received correctly in the huff version

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Components of ERC721 not properly (or at all) implemented in HUFF

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.