456
References
[REF-62]Mark Dowd, John McDonald and Justin Schuh. "The Art of Software Security
Assessment". 1st Edition. 2006. Addison Wesley.
[REF-961]Object Management Group (OMG). "Automated Source Code Reliability Measure
(ASCRM)". 2016 January. < http://www.omg.org/spec/ASCRM/1.0/ >.
[REF-962]Object Management Group (OMG). "Automated Source Code Security Measure
(ASCSM)". 2016 January. < http://www.omg.org/spec/ASCSM/1.0/ >.
CWE-457: Use of Uninitialized Variable
Weakness ID : 457
Structure : Simple
Abstraction : Variant
Description
The code uses a variable that has not been initialized, leading to unpredictable or unintended
results.
Extended Description
In some languages such as C and C++, stack variables are not initialized by default. They generally
contain junk data with the contents of stack memory before the function was invoked. An attacker
can sometimes control or read these contents. In other languages or conditions, a variable that
is not explicitly initialized can be given a default value that has security implications, depending
on the logic of the program. The presence of an uninitialized variable can sometimes indicate a
typographic error in the code.
Relationships
The table(s) below shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOr and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition, relationships such
as PeerOf and CanAlsoBe are defined to show similar weaknesses that may want to be explored.
Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name Page
ChildOf 908 Use of Uninitialized Resource 1792
CanFollow 456 Missing Initialization of a Variable 1089
Relevant to the view "CISQ Quality Measures (2020)" (CWE-1305)
CWE Version 4.14
CWE-457: Use of Uninitialized Variable
CWE-457: Use of Uninitialized Variable