CWE-665: Improper Initialization
337 CVEs have CWE-665 as their primary weakness. 3 of them are in the CISA KEV catalog. The highest EPSS score among them is 92.795%.
The product does not initialize or incorrectly initializes a resource.
Child of CWE-664: Improper Control of a Resource Through its Lifetime
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.
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
Top released CVEs
KEV first, then the highest EPSS score, the highest CVSS score and the newest.
| CVE | Published | Severity | CVSS | EPSS | Description |
|---|---|---|---|---|---|
| CVE-2022-0847 | 2022-03-07 | HIGH | 7.8 | 92.795% | A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe and push_pipe… |
| CVE-2020-27950 | 2020-12-08 | MEDIUM | 5.5 | 16.520% | A memory initialization issue was addressed. This issue is fixed in macOS Big Sur 11.0.1, watchOS 7.1, iOS 12.4.9, watchOS 6.2.9, Security Update 2020-006 High… |
| CVE-2013-1675 | 2013-05-16 | MEDIUM | 6.5 | 6.696% | Mozilla Firefox before 21.0, Firefox ESR 17.x before 17.0.6, Thunderbird before 17.0.6, and Thunderbird ESR 17.x before 17.0.6 do not properly initialize data… |
| CVE-2026-21171 | 2026-11-16 | MEDIUM | 5.8 | 0.163% | Improper initialization in Smart Switch prior to version 3.7.74.7 allows adjacent attackers to bypass user authorization. User interaction is required for… |
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cwe_lookup/CWE-665'curl 'https://api.contrastcyber.com/cve_search?cwe_id=CWE-665'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).