auctionSurplus() function have call backs that can lead to reentrancy and manipulating the transfer of tokens.
Malicious actor can manipulate token transfer by changing the _destination address to himself and get all the extra tokens.
Proof of Concept
auctionSurplus() calls the transferInternalCoins method of contract safeEngine which have _destination: extraSurplusReceiver, that can be used by malicious attacker for gaining all surplus funds.
Lines of code
https://github.com/open-dollar/od-contracts/blob/v1.5.5-audit/src/contracts/AccountingEngine.sol#L198
Vulnerability details
Impact
auctionSurplus()
function have call backs that can lead to reentrancy and manipulating the transfer of tokens. Malicious actor can manipulate token transfer by changing the_destination
address to himself and get all the extra tokens.Proof of Concept
auctionSurplus()
calls thetransferInternalCoins
method of contractsafeEngine
which have_destination: extraSurplusReceiver,
that can be used by malicious attacker for gaining all surplus funds.Tools Used
Manual Review
Recommended Mitigation Steps
Add nonReentrant reentrancy guard modifier by OpenZeppeling on the
auctionSurplus()
function.