The ReseedInternalBalances
contract lacks access control in its init
function, allowing any user to call it and set arbitrary internal balances for themselves in Beanstalk L2. This vulnerability could be exploited by an attacker to manipulate the Beanstalk protocol, potentially stealing assets from the protocol.
The init
function in the ReseedInternalBalances
contract does not have any access control, which means it can be called by anyone. This allows an attacker to set arbitrary internal balances for themselves, bypassing the actual balances required in Beanstalk L1. Here are the relevant code snippets:
ReseedInternalBalances Contract
The init
function is external and lacks any form of access control. This allows any user to call the function and pass arbitrary BeanstalkInternalBalance
parameters to the setInternalBalances
function. The setInternalBalances
function directly sets internal balances for farmers without verifying the actual balances in Beanstalk L1, enabling an attacker to set inflated or fake balances.
An attacker could set arbitrary internal balances for themselves or other addresses in Beanstalk L2, bypassing the need to have such balances in Beanstalk L1. This could lead to significant financial losses and exploitation of the protocol by allowing attackers to withdraw or use assets they do not legitimately possess.
VSCode
Make the init
function callable only by the DAO and ensure that it verifies the actual balances in Beanstalk L1 before setting internal balances in Beanstalk L2.
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.