The depositEgg()
function allows unauthorized users to spoof deposits, enabling theft of NFTs transferred to the vault.
Location: EggVault.sol
, depositEgg()
function
Code Snippet:
Public Function: Any address can call depositEgg()
and claim ownership of an NFT after it’s transferred to the vault.
No Validation: The depositor
parameter is user-provided and not tied to the actual NFT sender.
Alice transfers her NFT to the vault via eggNFT.transferFrom(alice, vault, tokenId)
.
Bob front-runs Alice’s depositEgg
transaction and calls depositEgg(tokenId, bob)
.
The vault records Bob as the depositor. Bob can now call withdrawEgg(tokenId)
to steal Alice’s NFT.
NFT Theft: Malicious users can claim ownership of any NFT sent to the vault.
Vault Integrity Compromised: The vault’s tracking system becomes untrustworthy.
Direct Financial Loss: Legitimate users lose their deposited assets.
Manual review.
**Restrict depositEgg
to Game Contract **
Front-running depositEgg allows deposit ownership hijacking.
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.