Last updated: March 11, 2025
SCWE-038: Insecure Use of Selfdestruct
Stable Version v0.0.1
This content is in the version-(v0.0.1) and still under active development, so it is subject to change any time (e.g. structure, IDs, content, URLs, etc.).
Send Feedback
Relationships
- CWE-732: Incorrect Permission Assignment for Critical Resource
CWE-732 Link
Description
Insecure use of selfdestruct refers to vulnerabilities that arise when the selfdestruct
function is used without proper safeguards. This can lead to:
- Unauthorized destruction of the contract.
- Loss of funds or data.
- Exploitation of vulnerabilities in contract logic.
- Restrict access: Ensure only authorized addresses can call
selfdestruct
.
- Implement circuit breakers: Add mechanisms to halt operations in case of suspicious activity.
- Test thoroughly: Conduct extensive testing to ensure
selfdestruct
is used securely.
Examples