| Impact | Details |
|---|---|
|
Modify Application Data |
Scope: Integrity
The object could potentially be tampered with.
|
|
Read Application Data |
Scope: Confidentiality
The object could potentially allow the object to be read.
|
| Phase(s) | Mitigation |
|---|---|
|
Architecture and Design |
Clearly identify the scope for all critical data elements, including whether they should be regarded as static.
|
|
Implementation |
Make any static fields private and constant. A constant field is denoted by the keyword 'const' in C/C++ and ' final' in Java |
| Nature | Type | ID | Name |
|---|---|---|---|
| ChildOf | Variant Variant - a weakness that is linked to a certain type of product, typically involving a specific language or technology. More specific than a Base weakness. Variant level weaknesses typically describe issues in terms of 3 to 5 of the following dimensions: behavior, property, technology, language, and resource. | 493 | Critical Public Variable Without Final Modifier |
| Phase | Note |
|---|---|
| Implementation |
C++ (Undetermined Prevalence)
Java (Undetermined Prevalence)
Example 1
The following examples use of a public static String variable to contain the name of a property/configuration file for the application.
Having a public static variable that is not marked final (constant) may allow the variable to the altered in a way not intended by the application. In this example the String variable can be modified to indicate a different on nonexistent properties file which could cause the application to crash or caused unexpected behavior.
| Method | Details |
|---|---|
|
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 |
| Nature | Type | ID | Name |
|---|---|---|---|
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 849 | The CERT Oracle Secure Coding Standard for Java (2011) Chapter 6 - Object Orientation (OBJ) |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1002 | SFP Secondary Cluster: Unexpected Entry Points |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1139 | SEI CERT Oracle Secure Coding Standard for Java - Guidelines 05. Object Orientation (OBJ) |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1403 | Comprehensive Categorization: Exposed Resource |
Rationale
This CWE entry is at the Variant level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.Comments
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.| Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
|---|---|---|---|
| CLASP | Overflow of static internal buffer | ||
| The CERT Oracle Secure Coding Standard for Java (2011) | OBJ10-J | Do not use public static nonfinal variables | |
| Software Fault Patterns | SFP28 | Unexpected access points |
| Submissions | |||
|---|---|---|---|
| Submission Date | Submitter | Organization | |
|
2006年07月19日
(CWE Draft 3, 2006年07月19日) |
CLASP | ||
| Modifications | |||
| Modification Date | Modifier | Organization | |
| 2023年06月29日 | CWE Content Team | MITRE | |
| updated Mapping_Notes | |||
| 2023年04月27日 | CWE Content Team | MITRE | |
| updated Detection_Factors, Relationships | |||
| 2020年02月24日 | CWE Content Team | MITRE | |
| updated References, Relationships | |||
| 2019年01月03日 | CWE Content Team | MITRE | |
| updated Relationships, Taxonomy_Mappings | |||
| 2017年11月08日 | CWE Content Team | MITRE | |
| updated White_Box_Definitions | |||
| 2014年07月30日 | CWE Content Team | MITRE | |
| updated Relationships, Taxonomy_Mappings | |||
| 2012年10月30日 | CWE Content Team | MITRE | |
| updated Demonstrative_Examples, Description, Potential_Mitigations | |||
| 2012年05月11日 | CWE Content Team | MITRE | |
| updated Relationships, Taxonomy_Mappings | |||
| 2011年06月01日 | CWE Content Team | MITRE | |
| updated Common_Consequences, Relationships, Taxonomy_Mappings | |||
| 2009年05月27日 | CWE Content Team | MITRE | |
| updated Relationships | |||
| 2008年11月24日 | CWE Content Team | MITRE | |
| updated Background_Details, Demonstrative_Examples, Description, Name, Other_Notes, Potential_Mitigations | |||
| 2008年11月05日 | CWE Content Team | MITRE | |
| Significant clarification of this entry, and improved examples. | |||
| 2008年09月08日 | CWE Content Team | MITRE | |
| updated Applicable_Platforms, Common_Consequences, Relationships, Other_Notes, Taxonomy_Mappings | |||
| 2008年08月01日 | KDM Analytics | ||
| added/updated white box definitions | |||
| 2008年07月01日 | Eric Dalci | Cigital | |
| updated Time_of_Introduction | |||
| Previous Entry Names | |||
| Change Date | Previous Entry Name | ||
| 2008年04月11日 | Overflow of Static Internal Buffer | ||
| 2008年11月24日 | Static Field Not Marked Final | ||
Use of the Common Weakness Enumeration (CWE™) and the associated references from this website are subject to the Terms of Use. CWE is sponsored by the U.S. Department of Homeland Security (DHS) Cybersecurity and Infrastructure Security Agency (CISA) and managed by the Homeland Security Systems Engineering and Development Institute (HSSEDI) which is operated by The MITRE Corporation (MITRE). Copyright © 2006–2025, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation.