Description
A static code block creates an instance of a class.
This pattern identifies situations where a storable data element or member data element is initialized with a value in a block of code which is declared as static.
Potential Impact
Other
Reduce Performance
Related Weaknesses
Taxonomy Mappings
- OMG ASCPEM: ASCPEM-PRF-1 —
Frequently Asked Questions
What is CWE-1063?
CWE-1063 (Creation of Class Instance within a Static Code Block) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Base-level weakness. A static code block creates an instance of a class.
How can CWE-1063 be exploited?
Attackers can exploit CWE-1063 (Creation of Class Instance within a Static Code Block) to reduce performance. This weakness is typically introduced during the Implementation phase of software development.
How do I prevent CWE-1063?
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-1063?
CWE-1063 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.