Skip to content

[Security] reentrancy — Potential reentrancy — external call before state update. If balances are... #1363

Description

@aldiboncel49-lgtm

I was reviewing Dapp-Learning-DAO/Dapp-Learning and found something in security/Analysis&POC/XSURGE/POC.sol line 65 that might need attention.

(bool buy_successful,) = payable(Surge_Address).call{value: address(this).balance, gas: 40000}("");

Potential reentrancy — external call before state update. If balances are updated after the call, an attacker can drain funds via re-entrant calls.

Worth a look to see if this is accounted for elsewhere — could be a real issue depending on the surrounding context.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions