Description
The code contains a class instance that calls the method or function to delete or destroy itself.
For example, in C++, "delete this" will cause the object to delete itself.
Potential Impact
Other
Reduce Reliability
Related Weaknesses
Taxonomy Mappings
- OMG ASCRM: ASCRM-RLB-7 —
Frequently Asked Questions
What is CWE-1082?
CWE-1082 (Class Instance Self Destruction Control Element) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Base-level weakness. The code contains a class instance that calls the method or function to delete or destroy itself.
How can CWE-1082 be exploited?
Attackers can exploit CWE-1082 (Class Instance Self Destruction Control Element) to reduce reliability. This weakness is typically introduced during the Implementation phase of software development.
How do I prevent CWE-1082?
Follow secure coding practices, conduct code reviews, and use automated security testing tools (SAST/DAST) to detect this weakness early in the development lifecycle.
What is the severity of CWE-1082?
CWE-1082 is classified as a Base-level weakness (Medium abstraction). Its actual severity depends on the specific context and how the weakness manifests in your application.