Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-457 (使用未经初始化的变量) — Vulnerability Class 111

111 vulnerabilities classified as CWE-457 (使用未经初始化的变量). AI Chinese analysis included.

CWE-457 represents a critical code quality weakness where software utilizes a variable before assigning it a defined value, resulting in unpredictable behavior or unintended execution paths. In languages like C and C++, uninitialized stack variables often retain residual data from previous operations, creating a source of non-deterministic state. Attackers typically exploit this by manipulating memory contents to influence program flow, potentially leading to information disclosure, privilege escalation, or denial of service through crashes. To mitigate this risk, developers must rigorously initialize all variables at the point of declaration or immediately before first use. Employing static analysis tools to detect uninitialized reads and adhering to strict coding standards that enforce explicit initialization practices are essential strategies for preventing this vulnerability and ensuring application stability and security.

MITRE CWE Description
The code uses a variable that has not been initialized, leading to unpredictable or unintended results. 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. An attacker can sometimes control or read these contents. 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. The presence of an uninitialized variable can sometimes indicate a typographic error in the code.
Common Consequences (2)
Availability, Integrity, OtherOther
Initial variables usually contain junk, which can not be trusted for consistency. This can lead to denial of service conditions, or modify control flow in unexpected ways. In some cases, an attacker can "pre-initialize" the variable using previous actions, which might enable code execution. This can…
Authorization, OtherOther
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.
Mitigations (5)
ImplementationEnsure that critical variables are initialized before first use [REF-1485].
Build and CompilationMost compilers will complain about the use of uninitialized variables if warnings are turned on.
Implementation, OperationWhen 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.
RequirementsChoose a language that is not susceptible to these issues.
Architecture and DesignMitigating technologies such as safe string libraries and container abstractions could be introduced.
Examples (2)
This code prints a greeting using information stored in a POST request:
if (isset($_POST['names'])) { $nameArray = $_POST['names']; } echo "Hello " . $nameArray['first'];
Bad · PHP
The following switch statement is intended to set the values of the variables aN and bN before they are used:
int aN, Bn; switch (ctl) { case -1: aN = 0; bN = 0; break; case 0: aN = i; bN = -i; break; case 1: aN = i + NEXT_SZ; bN = i - NEXT_SZ; break; default: aN = -1; aN = -1; break; } repaint(aN, bN);
Bad · C
CVE IDTitleCVSSSeverityPublished
CVE-2024-7540 oFono AT CMGL Command Uninitialized Variable Information Disclosure Vulnerability — oFono 6.2 -2024-08-05
CVE-2024-33021 Use of Uninitialized Variable in Automotive GPU — Snapdragon 8.4 High2024-08-05
CVE-2024-6990 Google Chrome 安全漏洞 — Chrome 8.8AIHighAI2024-08-01
CVE-2024-23159 Multiple ZDI Vulnerabilities in Autodesk AutoCAD and certain AutoCAD-based products — AutoCAD 7.8 High2024-06-25
CVE-2024-37002 Multiple Vulnerabilities in the Autodesk AutoCAD Desktop Software — AutoCAD 7.8 High2024-06-25
CVE-2023-6324 ThroughTek Kalay SDK error in handling the PSK identity — Kalay SDK 8.1 High2024-05-15
CVE-2021-34953 Foxit PDF Reader Annotation Use of Uninitialized Variable Remote Code Execution Vulnerability — PDF Reader 7.8 -2024-05-07
CVE-2021-34951 Foxit PDF Reader Annotation Use of Uninitialized Variable Information Disclosure Vulnerability — PDF Reader 5.5 -2024-05-07
CVE-2023-50188 Trimble SketchUp Viewer SKP File Parsing Uninitialized Variable Remote Code Execution Vulnerability — SketchUp Viewer 7.8 -2024-05-03
CVE-2023-42079 PDF-XChange Editor J2K File Parsing Uninitialized Variable Information Disclosure Vulnerability — PDF-XChange Editor 5.5 -2024-05-03
CVE-2023-42062 PDF-XChange Editor U3D File Parsing Uninitialized Variable Remote Code Execution Vulnerability — PDF-XChange Editor 7.8 -2024-05-03
CVE-2023-42056 PDF-XChange Editor U3D File Parsing Uninitialized Variable Information Disclosure Vulnerability — PDF-XChange Editor 5.5 -2024-05-03
CVE-2023-42048 PDF-XChange Editor J2K File Parsing Uninitialized Variable Information Disclosure Vulnerability — PDF-XChange Editor 5.5 -2024-05-03
CVE-2023-42046 PDF-XChange Editor J2K File Parsing Uninitialized Variable Information Disclosure Vulnerability — PDF-XChange Editor 5.5 -2024-05-03
CVE-2023-39484 PDF-XChange Editor PDF File Parsing Uninitialized Variable Information Disclosure Vulnerability — PDF-XChange Editor 5.5 -2024-05-03
CVE-2023-38088 Kofax Power PDF printf Uninitialized Variable Remote Code Execution Vulnerability — Power PDF 7.8 -2024-05-03
CVE-2023-34310 Ashlar-Vellum Cobalt Uninitialized Memory Remote Code Execution Vulnerability — Cobalt 7.8 -2024-05-03
CVE-2024-32625 Uninitialized scalar field — Falcon/Crane 5.8 Medium2024-04-16
CVE-2024-29838 Unsanitised variable on DAL_ADD in Evolution Controller causes application level denial of service and crash — Evolution Controller 7.5 High2024-04-14
CVE-2024-31874 IBM Security Verify Access Appliance denial of service — Security Verify Access Appliance 6.2 Medium2024-04-10
CVE-2024-21502 fastecdsa 安全漏洞 — fastecdsa 7.5 High2024-02-24
CVE-2024-23137 Multiple Vulnerabilities in the Autodesk AutoCAD Desktop Software — AutoCAD 7.8 High2024-02-22
CVE-2024-26147 Helm's Missing YAML Content Leads To Panic — helm 7.5 High2024-02-21
CVE-2023-31275 Kingsoft WPS 安全漏洞 — WPS Office 8.8 High2023-11-27
CVE-2023-31192 SoftEther VPN 信息泄露漏洞 — SoftEther VPN 5.3 Medium2023-10-12
CVE-2023-25585 Field `file_table` of `struct module *module` is uninitialized — binutils 4.7 Medium2023-09-14
CVE-2023-25586 Local variable `ch_type` in function `bfd_init_section_decompress_status` can be uninitialized — binutils 4.7 Medium2023-09-14
CVE-2023-25588 Field `the_bfd` of `asymbol` is uninitialized in function `bfd_mach_o_get_synthetic_symtab` — binutils 4.7 Medium2023-09-14
CVE-2022-40510 Buffer copy without checking size of input in Audio. — Snapdragon 9.8 Critical2023-08-08
CVE-2022-25737 Use of Uninitialized Variable in MODEM — Snapdragon 7.5 High2023-04-04

Vulnerabilities classified as CWE-457 (使用未经初始化的变量) represent 111 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.