1. CVE archive
  2. Vulnerability types
  3. CWE-457
CWE-457 · #130 most frequent type in the archive

Use of Uninitialized Variable

The code uses a variable that has not been initialized, leading to unpredictable or unintended results.

Part of: CWE-908 · Use of Uninitialized Resource

222CVEs of this type in the archive
8critical (CVSS ≥ 9)
63high severity (7–8.9)
Nov 25, 2026latest published

What it is

The code uses a variable that has not been initialized, leading to unpredictable or unintended results.

Impact on systems

ScopeImpact
Confidentiality, Integrity, Availability, Other Varies by Context, Read Application Data
Uninitialized variables usually contain junk, which can not be trusted for consistency. Depending on the context, uninitialized variables could lead to denial of service conditions, or modify control flow in unexpected ways. They could also contain sensitive information that could be leaked if the variable is used in output. In some cases, an attacker can pre-initialize the variable using previous actions - i.e., control the contents of the variable - which might enable code execution.
Availability Alter Execution Logic, Unexpected State
This can cause a race condition if a lock variable check passes when it should not.
Authorization, Other Varies by Context
Strings that are not initialized are especially dangerous, since many functions expect a null at the end -- and only at the end -- of a string.

How to prevent it

Implementation · Attack Surface Reduction Ensure that critical variables are initialized before first use.
Build and Compilation · Compilation or Build Hardening Most compilers will complain about the use of uninitialized variables if warnings are turned on.
Implementation · Operation When using a language that does not require explicit declaration of variables, run or compile the software in a mode that reports undeclared or unknown variables. This may indicate the presence of a typographic error in the variable's name.
Requirements · Language Selection Choose a language that is not susceptible to these issues.
Architecture and Design Mitigating technologies such as safe string libraries and container abstractions could be introduced.

Source: MITRE CWE catalog · Official entry on the MITRE website

CWE-457 CVEs published per year

2026: year in progress, updated every hour

Show the data as a table
YearCVE
20212
20224
20234
202410
202527
2026175

All CWE-457 CVEs

222 results

Dottor Marc

Is this type of vulnerability in your systems?

An archive tells you what exists; a Vulnerability Assessment tells you what is exposed on your side. Dottor Marc tests your web applications and network with automated and manual checks.