CWE-457: Use of Uninitialized Variable
The code uses a variable that has not been initialized, leading to unpredictable or unintended results.
Last updated
Overview
CWE-457 (Use of Uninitialized Variable) is a variant-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.
Background
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. 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.
Real-world CVEs
314 recorded CVEs are caused by CWE-457 (Use of Uninitialized Variable). The highest-severity and most recent are shown first. 200 new CWE-457 CVEs have been recorded so far in 2026 (40 in 2025).