CWEweakness
CWE-1419 Incorrect Initialization of Resource
- Abstraction
- Class
- Structure
- Simple
- Status
- Incomplete
- Languages
- Not Language-Specific
- CWE version
- 5.0
Description
The product attempts to initialize a resource but does not correctly do so, which might leave the resource in an unexpected, incorrect, or insecure state when it is accessed.
Extended description
This can have security implications when the associated resource is expected to have certain properties or values. Examples include a variable that determines whether a user has been authenticated or not, or a register or fuse value that determines the security state of the product.
Common consequences
• Confidentiality: Read Memory, Read Application Data, Unexpected State
• Authorization, Integrity: Gain Privileges or Assume Identity
• Other: Varies by Context — The technical impact can vary widely based on how the resource is used in the product, and whether its contents affect security decisions.
Potential mitigations
• [Implementation] Choose the safest-possible initialization for security-related resources.
• [Implementation] Ensure that each resource (whether variable, memory buffer, register, etc.) is fully initialized.
• [Implementation] Pay close attention to complex conditionals or reset sources that affect initialization, since some paths might not perform the initialization.
• [Architecture and Design] Ensure that the design and architecture clearly identify what the initialization should be, and that the initialization does not have security implications.
Detection methods
• 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-2020-27211: Chain: microcontroller system-on-chip uses a register value stored in flash to set product protection state on the memory bus and does not contain protection against fault injection (CWE-1319) which leads to an incorrect initialization of the memory bus (CWE-1419) causing the product to be in an unprotected state.
• CVE-2023-25815: Chain: a change in an underlying package causes the gettext function to use implicit initialization with a hard-coded path (CWE-1419) under the user-writable C:\ drive, introducing an untrusted search path element (CWE-427) that enables spoofing of messages.
• CVE-2022-43468: WordPress module sets internal variables based on external inputs, allowing false reporting of the number of views
• CVE-2022-36349: insecure default variable initialization in BIOS firmware for a hardware board allows DoS
• CVE-2015-7763: distributed filesystem only initializes part of the variable-length padding for a packet, allowing attackers to read sensitive information from previously-sent packets in the same memory location
Related
Observed example · CVE (5)
- CVE-2023-25815 In Git for Windows, the Windows port of Git, no localized messages are shipped with the installer. vulnerability
- CVE-2022-43468 External initialization of trusted variables or data stores vulnerability exists in WordPress Popular Posts 6.0.5 and earlier, therefore… vulnerability
- CVE-2022-36349 Insecure default variable initialization in BIOS firmware for some Intel(R) NUC Boards and Intel(R) NUC Kits before version MYi30060 may… vulnerability
- CVE-2020-27211 Nordic Semiconductor nRF52840 devices through 2020-10-19 have improper protection against physical side channels. vulnerability
- CVE-2015-7763 rx/rx.c in OpenAFS 1.5.75 through 1.5.78, 1.6.x before 1.6.15, and 1.7.x before 1.7.33 does not properly initialize padding at the end of… vulnerability
Child of · CWE (1)
- CWE-665 Improper Initialization weakness
Referenced by CWE · child of (5)
- CWE-1051 Initialization with Hard-Coded Network Resource Configuration Data weakness
- CWE-1052 Excessive Use of Hard-Coded Literals in Initialization weakness
- CWE-1188 Initialization of a Resource with an Insecure Default weakness
- CWE-1221 Incorrect Register Defaults or Module Parameters weakness
- CWE-454 External Initialization of Trusted Variables or Data Stores weakness