05.SWC-105_Unprotected Ether Withdrawal
2023-07-13 16:10:50
# 09.SWC
SWC-105_Unprotected Ether Withdrawal
Unprotected Ether Withdrawal
Description: Due to missing or insufficient access controls, malicious parties can withdraw some or all Ether from the contract account.
This bug is sometimes caused by unintentionally exposing initialization functions. By wrongly naming a function intended to be a constructor, the constructor code ends up in the runtime byte code and can be called by anyone to re-initialize the contract.
Remediation: Implement controls so withdrawals can only be triggered by authorized parties or according to the specs of the smart contract system.
vulnerability contract 1
1 | pragma solidity ^0.4.21; |
vulnerability contract …………