Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Control Vulnerability in donate Function #2

Open
BugmakerCC opened this issue Nov 19, 2024 · 0 comments
Open

Access Control Vulnerability in donate Function #2

BugmakerCC opened this issue Nov 19, 2024 · 0 comments

Comments

@BugmakerCC
Copy link

Filepath

contracts/misc/ErrorPartnerSale.sol

Description

The donate function in the EtherCharity contract lacks proper access control, allowing anyone to call the function and transfer the contract’s balance to an arbitrary address. This exposes the contract to potential exploitation, as unauthorized users can drain its funds.

Vulnerable Code

function donate(address beneficiary) {
    selfdestruct(beneficiary);
}

Impact

All funds in the EtherCharity contract are at risk of being stolen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant