Impact:
An attacker can burn without any access control.
Proof of Concept
We can find the following logic process:Liquidizer.performUpkeep--->salt.burnTokensInContract()
Staking.recoverSALT--->salt.burnTokensInContract();
But there are no access control for burn process.
Tools Used
vscode foundry
Recommended Mitigation Steps
we can define some role,which have access control for the function of burnTokensInContract of Salt.
Lines of code
https://github.com/code-423n4/2024-01-salty/blob/53516c2cdfdfacb662cdea6417c52f23c94d5b5b/src/Salt.sol#L25 https://github.com/code-423n4/2024-01-salty/blob/53516c2cdfdfacb662cdea6417c52f23c94d5b5b/src/stable/Liquidizer.sol#L132 https://github.com/code-423n4/2024-01-salty/blob/53516c2cdfdfacb662cdea6417c52f23c94d5b5b/src/staking/Staking.sol#L101
Vulnerability details
Impact: An attacker can burn without any access control.
Proof of Concept
We can find the following logic process:Liquidizer.performUpkeep--->salt.burnTokensInContract() Staking.recoverSALT--->salt.burnTokensInContract(); But there are no access control for burn process.
Tools Used
vscode foundry
Recommended Mitigation Steps
we can define some role,which have access control for the function of burnTokensInContract of Salt.
Assessed type
Access Control