CWEweakness
CWE-665 Improper Initialization
Medium
Official page ↗
- Abstraction
- Class
- Structure
- Simple
- Status
- Draft
- Likelihood of exploit
- Medium
- Languages
- Not Language-Specific, Python
- CWE version
- 5.0
Description
The product does not initialize or incorrectly initializes a resource.
Common consequences
• Other: Varies by Context — The resource might be left in an unexpected state when it is accessed or used.
• Confidentiality: Read Memory, Read Application Data — When reusing a resource such as memory or a program variable, the original contents of that resource may not be cleared before it is sent to an untrusted party.
• Access Control: Bypass Protection Mechanism — If security-critical decisions rely on a variable having a "0" or equivalent value, and the programming language performs this initialization on behalf of the programmer, then a bypass of security may occur.
• Availability: DoS: Crash, Exit, or Restart — The uninitialized data may contain values that cause program flow to change in ways that the programmer did not intend. For example, if an uninitialized variable is used as an array index in C, then its previous contents may produce an index that is outside the range of the array, possibly causing a crash or an exit in other environments.
Potential mitigations
• [Requirements] Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
For example, in Java, if the programmer does not explicitly initialize a variable, then the code could produce a compile-time error (if the variable is local) or automatically initialize the variable to the default value for the variable's type. In Perl, if explicit initialization is not performed, then a default value of undef is assigned, which is interpreted as 0, false, or an equivalent value depending on the context in which the variable is accessed.
• [Architecture and Design] Identify all variables and data stores that receive information from external sources, and apply input validation to make sure that they are only initialized to expected values.
• [Implementation] Explicitly initialize all your variables and other data stores, either during declaration or just before the first usage.
• [Implementation] Pay close attention to complex conditionals that affect initialization, since some conditions might not perform the initialization.
• [Implementation] Avoid race conditions (CWE-362) during initialization routines.
• [Build and Compilation] Run or compile your product with settings that generate warnings about uninitialized variables or data.
Detection methods
• Automated Dynamic Analysis: This weakness can be detected using dynamic tools and techniques that interact with the software using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The software's operation may slow down, but it should not become unstable, crash, or generate incorrect results.
Initialization problems may be detected with a stress-test by calling the software simultaneously from a large number of threads or processes, and look for evidence of any unexpected behavior. The software's operation may slow down, but it should not become unstable, crash, or generate incorrect results.
• Manual Dynamic Analysis: Identify error conditions that are not likely to occur during normal usage and trigger them. For example, run the program under low memory conditions, run with insufficient privileges or permissions, interrupt a transaction before it is completed, or disable connectivity to basic network services such as DNS. Monitor the software for any unexpected behavior. If you trigger an unhandled exception or similar error that was discovered and handled by the application's environment, it may still indicate unexpected conditions that were not handled by the application itself.
• 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.)
Observed examples
• CVE-2001-1471: Chain: an invalid value prevents a library file from being included, skipping initialization of key variables, leading to resultant eval injection.
• CVE-2008-3637: Improper error checking in protection mechanism produces an uninitialized variable, allowing security bypass and code execution.
• CVE-2008-4197: Use of uninitialized memory may allow code execution.
• CVE-2008-2934: Free of an uninitialized pointer leads to crash and possible code execution.
• CVE-2007-3749: OS kernel does not reset a port when starting a setuid program, allowing local users to access the port and gain privileges.
• CVE-2008-0063: Product does not clear memory contents when generating an error message, leading to information leak.
• CVE-2008-0062: Lack of initialization triggers NULL pointer dereference or double-free.
• CVE-2008-0081: Uninitialized variable leads to code execution in popular desktop application.
• CVE-2008-3688: Chain: Uninitialized variable leads to infinite loop.
• CVE-2008-3475: Chain: Improper initialization leads to memory corruption.
• CVE-2008-5021: Composite: race condition (CWE-362) allows attacker to modify an object while it is still being initialized, causing software to access uninitialized memory (CWE-908).
• CVE-2005-1036: Chain: Bypass of access restrictions due to improper authorization (CWE-862) of a user results from an improperly initialized (CWE-909) I/O permission bitmap
• CVE-2008-3597: Chain: game server can access player data structures before initialization has happened leading to NULL dereference
• CVE-2009-2692: Chain: Use of an unimplemented network socket operation pointing to an uninitialized handler function (CWE-456) causes a crash because of a null pointer dereference (CWE-476).
• CVE-2009-0949: Chain: improper initialization of memory can lead to NULL dereference
• CVE-2009-3620: Chain: some unprivileged ioctls do not verify that a structure has been initialized before invocation, leading to NULL dereference
Related
Attack pattern · CAPEC (2)
Observed example · CVE (16)
- CVE-2009-3620 The ATI Rage 128 (aka r128) driver in the Linux kernel before 2.6.31-git11 does not properly verify Concurrent Command Engine (CCE) state… vulnerability
- CVE-2009-2692 The Linux kernel 2.6.0 through 2.6.30.4, and 2.4.4 through 2.4.37.4, does not initialize all function pointers for socket operations in… vulnerability
- CVE-2009-0949 The ippReadIO function in cups/ipp.c in cupsd in CUPS before 1.3.10 does not properly initialize memory for IPP request packets, which… vulnerability
- CVE-2008-5021 nsFrameManager in Firefox 3.x before 3.0.4, Firefox 2.x before 2.0.0.18, Thunderbird 2.x before 2.0.0.18, and SeaMonkey 1.x before 1.1.13… vulnerability
- CVE-2008-3475 Microsoft Internet Explorer 6 does not properly handle errors related to using the componentFromPoint method on xml objects that have been… vulnerability
- CVE-2008-4197 Opera before 9.52 on Windows, Linux, FreeBSD, and Solaris, when processing custom shortcut and menu commands, can produce argument strings… vulnerability
- CVE-2008-3637 The Hash-based Message Authentication Code (HMAC) provider in Java on Apple Mac OS X 10.4.11, 10.5.4, and 10.5.5 uses an uninitialized… vulnerability
- CVE-2008-3688 sockethandler.cpp in HTTP Antivirus Proxy (HAVP) 0.88 allows remote attackers to cause a denial of service (hang) by connecting to a… vulnerability
- CVE-2008-3597 Skulltag before 0.97d2-RC6 allows remote attackers to cause a denial of service (NULL pointer dereference and daemon crash) by sending a… vulnerability
- CVE-2008-2934 Mozilla Firefox 3 before 3.0.1 on Mac OS X allows remote attackers to cause a denial of service (application crash) or possibly execute… vulnerability
- CVE-2008-0062 KDC in MIT Kerberos 5 (krb5kdc) does not set a global variable for some krb4 message types, which allows remote attackers to cause a denial… vulnerability
- CVE-2008-0063 The Kerberos 4 support in KDC in MIT Kerberos 5 (krb5kdc) does not properly clear the unused portion of a buffer when generating an error… vulnerability
- CVE-2008-0081 Unspecified vulnerability in Microsoft Excel 2000 SP3 through 2003 SP2, Viewer 2003, and Office 2004 for Mac allows user-assisted remote… vulnerability
- CVE-2007-3749 The kernel in Apple Mac OS X 10.4 through 10.4.10 does not reset the current Mach Thread Port or Thread Exception Port when executing a… vulnerability
- CVE-2005-1036 FreeBSD 5.x to 5.4 on AMD64 does not properly initialize the IO permission bitmap used to allow user access to certain hardware, which… vulnerability
- CVE-2001-1471 prefs.php in phpBB 1.4.0 and earlier allows remote authenticated users to execute arbitrary PHP code via an invalid language value, which… vulnerability
Child of · CWE (1)
- CWE-664 Improper Control of a Resource Through its Lifetime weakness
Referenced by CAPEC · weakness (2)
Referenced by CVE · weakness (372)
- CVE-2026-103394 An Improper Initialization vulnerability in the SSR software in Juniper Networks Session Smart Router allows an attacker to decrypt traffic… vulnerability
- CVE-2026-116115 A security vulnerability has been detected in Yoosee GM8135S Camera 21.00.01.36. vulnerability
- CVE-2026-101957 An Improper Initialization vulnerability in the routing protocol daemon (rpd) of Juniper Networks Junos OS and Junos OS Evolved allows a… vulnerability
- CVE-2026-94370 A defect in the Qt for MCUs core string handling causes heap memory corruption. vulnerability
- CVE-2026-107175 MISP contains a defect in its event save workflow that prevents the correlation engine from recalculating correlations when an event's… vulnerability
- CVE-2026-93495 Improper initialization in an ASUS certain motherboard allows an physically proximate user to read or write arbitrary memory by inserting a… vulnerability
- CVE-2026-57229 Suricata is a network Intrusion Detection System, Intrusion Prevention System and Network Security Monitoring engine. vulnerability
- CVE-2026-87616 Improper initialization in Views in Google Chrome on on Windows prior to 153.0.8010.36 allowed a remote attacker who had compromised the… vulnerability
- CVE-2026-78940 Improper initialization in Network in Google Chrome prior to 152.0.7977.65 allowed a remote attacker to bypass web origin policy via a… vulnerability
- CVE-2026-68461 In the Linux kernel, the following vulnerability has been resolved: device property: initialize the remaining fields of fwnode_handle in… vulnerability
- CVE-2026-12233 The PSA Protected Storage credential backend (subsys/net/lib/tls_credentials/tls_credentials_trusted.c) declared its credential-store mutex… vulnerability
- CVE-2026-20734 Improper initialization in some firmware for some Intel(R) Active Management Technology (Intel(R) AMT), and some Intel(R) Standard… vulnerability
- CVE-2026-62433 Parts of the DM_OP handling code assumes the caller has provided the required number of buffers for the given operation without any… vulnerability
- CVE-2026-64775 A memory initialization issue was addressed with improved memory handling. vulnerability
- CVE-2026-64368 In the Linux kernel, the following vulnerability has been resolved: mm/slab: do not limit zeroing to orig_size when only red zoning is… vulnerability
- CVE-2026-53398 In the Linux kernel, the following vulnerability has been resolved: NFSD: Fix SECINFO_NO_NAME decode error cleanup… vulnerability
- CVE-2026-64035 In the Linux kernel, the following vulnerability has been resolved: igc: set tx buffer type for SMD frames Sashiko pointed out that… vulnerability
- CVE-2026-44434 Quicly is an IETF QUIC protocol implementation intended primarily for use within the H2O HTTP server. vulnerability
- CVE-2026-54777 CoreWCF is a port of the service side of Windows Communication Foundation (WCF) to .NET Core. vulnerability
- CVE-2026-54409 A malicious actor with access to the network and under certain conditions could exploit an Improper Initialization vulnerability found in… vulnerability
- CVE-2026-54279 AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. vulnerability
- CVE-2026-12539 Docker Sandboxes (sbx) blocks ICMP egress with an authorizer applied only at network-creation time, and does not re-apply it to networks… vulnerability
- CVE-2025-35991 Improper initialization in the UEFI firmware for some Intel platforms within Ring 0: Bare Metal OS may allow an information disclosure. vulnerability
- CVE-2026-31693 In the Linux kernel, the following vulnerability has been resolved: cifs: some missing initializations on replay In several places in the… vulnerability
- CVE-2026-34553 iccDEV provides a set of libraries and tools for working with ICC color management profiles. vulnerability
- CVE-2026-23253 In the Linux kernel, the following vulnerability has been resolved: media: dvb-core: fix wrong reinitialization of ringbuffer on reopen… vulnerability
- CVE-2026-0940 A potential improper initialization vulnerability was reported in the BIOS of some ThinkPads that could allow a local privileged user to… vulnerability
- CVE-2025-66363 An issue was discovered in LBS in Samsung Mobile Processor Exynos 2200. vulnerability
- CVE-2026-26958 filippo.io/edwards25519 is a Go library implementing the edwards25519 elliptic curve with APIs for building cryptographic primitives. vulnerability
- CVE-2025-25058 Improper initialization for some ESXi kernel mode driver for the Intel(R) Ethernet 800-Series before version 2.2.2.0 (esxi 8.0) &… vulnerability
Referenced by CWE · child of (10)
- CWE-1188 Initialization of a Resource with an Insecure Default weakness
- CWE-1279 Cryptographic Operations are Run Before Supporting Units are Ready weakness
- CWE-1419 Incorrect Initialization of Resource weakness
- CWE-1434 Insecure Setting of Generative AI/ML Model Inference Parameters weakness
- CWE-455 Non-exit on Failed Initialization weakness
- CWE-456 Missing Initialization of a Variable weakness
- CWE-457 Use of Uninitialized Variable weakness
- CWE-770 Allocation of Resources Without Limits or Throttling weakness
- CWE-908 Use of Uninitialized Resource weakness
- CWE-909 Missing Initialization of Resource weakness