When initializing a vault instance, the Vault::initVault
function must be called with the managerContract
address. This function, in turn, triggers LoveToken::initVault
, granting access to 500M LoveToken
and approving managerContract
to manage them. Malicious actors can front-run the Vault::initVault
function, setting themselves as managerContract
to gain unauthorized access to the 500M LoveToken
allocated during initialization.
Below marked calls can be front-run. The below code is from BaseTest.t.sol
from setUp
function.
An attacker can claim access to 500M LoveTokens after getting approval of the Vault instance.
Manual review
Consider adding access control mechanisms to prevent unauthorized calls to this 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.