Description
The product initializes a data element using a hard-coded literal that is not a simple integer or static constant element.
Potential Impact
Other
Reduce Maintainability
Related Weaknesses
Taxonomy Mappings
- OMG ASCMM: ASCMM-MNT-3 —
Frequently Asked Questions
What is CWE-1052?
CWE-1052 (Excessive Use of Hard-Coded Literals in Initialization) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Base-level weakness. The product initializes a data element using a hard-coded literal that is not a simple integer or static constant element.
How can CWE-1052 be exploited?
Attackers can exploit CWE-1052 (Excessive Use of Hard-Coded Literals in Initialization) to reduce maintainability. This weakness is typically introduced during the Implementation phase of software development.
How do I prevent CWE-1052?
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-1052?
CWE-1052 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.