code-423n4 / 2022-05-aura-findings

0 stars 1 forks source link

Steal directly transferred funds via backrunning #344

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Lines of code

https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/CrvDepositorWrapper.sol#L132

Vulnerability details

Issue: If BPT is sent to the contract for any reason, an attacker can call deposit and claim the BPT for themselves.

Consequences: Loss of any BPT sent to the contract directly.

Proof of Concept:

Mitigations: User education and documentation.

dmvt commented 2 years ago

As I've said in other issues, users who directly send funds randomly to smart contracts should expect to lose them. Invalid.