sherlock-audit / 2024-08-flayer-judging

2 stars 0 forks source link

zzykxx - Settings functions frontrun in Moongate #715

Open sherlock-admin2 opened 1 month ago

sherlock-admin2 commented 1 month ago

zzykxx

Medium

Settings functions frontrun in Moongate

Summary

No response

Root Cause

The functions:

are callable by anybody as long as the current addresses are not set to address(0).

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

  1. Flayer deploys the InfernalRiftAbove contract
  2. An attacker monitors the chain to know when the InfernalRiftAbove has been deployed
  3. Attacker calls the functions listed above in order to set wrong address

Impact

PoC

No response

Mitigation

Allow the listed functions to only be called by admins and/or set their values in the constructor.