Skip to content

Multiple initialize functions #19

@code423n4

Description

@code423n4

Handle

jonah1005

Vulnerability details

Impact

Multiple initialize functions of floatToken. An attacker may front-runinitializeFloatToken transaction with initialize and mock the exact behaviors and grant the attacker's owner role.

Proof of Concept

https://github.com/code-423n4/2021-08-floatcapital/blob/main/contracts/contracts/FloatToken.sol#L14-L21

Tools Used

None

Recommended Mitigation Steps

While the dev team is aware of this and leaves the comment in the contract, over-ride the initialize function would possibly clear the uncertainty.

  function initialize(
      string memory name,
      string memory symbol
    ) public initializer override {
      revert("!authorized")
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions