code-423n4 / 2021-12-vader-findings

0 stars 0 forks source link

mintSynth and mintFungible function are not verified from==msg.sender #118

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

cccz

Vulnerability details

Impact

The mintSynth function and the mintFungible function are not verified from==msg.sender, causing anyone to use other people’s tokens to mint Synth or LP tokens for themselves

Proof of Concept

https://github.com/code-423n4/2021-12-vader/blob/main/contracts/dex-v2/pool/VaderPoolV2.sol#L153-L194

https://github.com/code-423n4/2021-12-vader/blob/main/contracts/dex-v2/pool/VaderPoolV2.sol#L311-L361

Tools Used

Manual analysis

Recommended Mitigation Steps

Add the following code to the mintSynth function and mintFungible function

require(from == msg.sender);
jack-the-pug commented 2 years ago

Dup of #147