The depositEgg
function in EggVault.sol contains a critical vulnerability that allows any caller to arbitrarily set the depositor address for deposited NFTs. Combined with missing access controls, this enables attackers to steal deposited NFTs by front-running legitimate deposit transactions.
The vulnerable code exists in the depositEgg
function:
Attack flow:
User A transfers their NFT to the vault
Attacker front-runs the deposit transaction by calling depositEgg(tokenId, attackerAddress)
Attacker becomes the recorded depositor
Attacker calls withdrawEgg
to steal the NFT
• Permanent loss of user NFTs (direct financial impact)
• Complete compromise of vault security model
• Loss of protocol credibility
• Manual code review
• Foundry test simulation
Critical Fix:
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.