The KittyBridge::bridgeNftWithData
function is vulnerable to reentrancy attack.
The attacker can call the KittyBridge::bridgeNftWithData
with crafted data and in the callback function onERC721Received
, they can call the KittyBridge::bridgeNftWithData
again, which will lead to unauthorized minting of NFTs. The only limitation is that the KittyBridge should have enough link token and the transaction should always go through.
Attacker Contract:
Test Case:
This will lead to unauthorized minting of NFTs, which will lead to loss of funds for the owner of the contract.
Manual review
To prevent reentrancy, the contract should use the reentrancy guard modifier from OpenZeppelin in the bridgeNftWithData
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.