CWE-1052: Excessive Use of Hard-Coded Literals in Initialization
The product initializes a data element using a hard-coded literal that is not a simple integer or static constant element.
Last updated
Overview
CWE-1052 (Excessive Use of Hard-Coded Literals in Initialization) is a base-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
Common consequences
What can happen when CWE-1052 is exploited.
Reduce Maintainability
Affects: Other
This issue makes it more difficult to modify or maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
How to detect it
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Effectiveness: High
Terminology & mappings
Mapped taxonomies
- OMG ASCMM (ASCMM-MNT-3)
Frequently asked questions
Common questions about CWE-1052.
- What is CWE-1052?
- The product initializes a data element using a hard-coded literal that is not a simple integer or static constant element.
- How is CWE-1052 detected?
- Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
- What are the consequences of CWE-1052?
- Exploiting CWE-1052 can lead to: Reduce Maintainability.
Sources
References
- MITRE CWE definition (CWE-1052) (opens in a new tab)
- CWE-1052 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.21). CVE associations are aggregated and kept current by RadicalNotion.AI.
Track CWE-1052 CVEs
Get an alert when a new CWE-1052 CVE affects your products, with AI-written analysis and remediation steps.